Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悶]deployments (node): refactor express and fastify inputs #5795

Closed
tampler opened this issue Jan 29, 2024 · 3 comments 路 Fixed by #6577
Closed

[馃悶]deployments (node): refactor express and fastify inputs #5795

tampler opened this issue Jan 29, 2024 · 3 comments 路 Fixed by #6577
Assignees
Labels
COMMUNITY: good first issue Good for newcomers COMMUNITY: PR is welcomed We think it's a good feature to have but would love for the community to help with the PR for it STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@tampler
Copy link

tampler commented Jan 29, 2024

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"
  }
@tampler tampler added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Jan 29, 2024
@gioboa gioboa added COMMUNITY: good first issue Good for newcomers COMMUNITY: PR is welcomed We think it's a good feature to have but would love for the community to help with the PR for it labels Jun 17, 2024
@gioboa
Copy link
Member

gioboa commented Jun 17, 2024

Here is the piece of code to change. you need to change the express as well.
In fact, here is merging the dependencies.

@thecoder93
Copy link
Contributor

Hey, I will work on it. Can you assign me this issue pls?

@gioboa
Copy link
Member

gioboa commented Jun 17, 2024

Hey, I will work on it. Can you assign me this issue pls?

Thanks @thecoder93 馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMMUNITY: good first issue Good for newcomers COMMUNITY: PR is welcomed We think it's a good feature to have but would love for the community to help with the PR for it STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants