qwik
qwik copied to clipboard
[🐞]deployments (node): refactor express and fastify inputs
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
Following docs and adding a node deployment based on express or fastify appends to devDepenencies instead of dependecies.
This results in errors for production build: console | Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'react' imported from /app/server/entry.fastify.mjs
This is what I get for fastify:
"devDependencies": { <----- dev, won't be used in production
"dotenv": "^16.4.1",
"fastify": "^4.25.2",
"fastify-plugin": "^4.5.1"
}
Reproduction
RUN pnpm i --prod --frozen-lockfile
Steps to reproduce
npm run qwik add fastify/express
System Info
System:
OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 4.13 GB / 15.49 GB
Container: Yes
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 20.11.0 - /opt/node/bin/node
npm: 10.2.4 - /opt/node/bin/npm
pnpm: 8.15.0 - ~/.local/share/pnpm/pnpm
Browsers:
Chromium: 121.0.6167.85
npmPackages:
@builder.io/qwik: ^1.4.2 => 1.4.2
@builder.io/qwik-city: ^1.4.2 => 1.4.2
@builder.io/qwik-react: 0.5.2 => 0.5.2
@builder.io/vite-plugin-macro: ~0.0.7 => 0.0.7
undici: ^6.5.0 => 6.5.0
vite: ^5.0.12 => 5.0.12
Additional Information
Correct dependencies should look like this:
"dependencies": {
"@fastify/static": "^6.12.0",
"dotenv": "^16.4.1",
"fastify": "^4.25.2",
"fastify-plugin": "^4.5.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"recharts": "^2.11.0",
"undici": "^6.5.0"
}