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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netlify / NextJS | Module not found: Error: Can't resolve '_http_common' in '/opt/build/repo/node_modules/@prisma/client/runtime #8503

Closed
StartMeUp opened this issue Jul 30, 2021 · 2 comments
Labels
kind/bug A reported bug.

Comments

@StartMeUp
Copy link

Bug description

I can't deploy nextJs + prisma on Netlify. It works fine on my local PC (wsl2, node 14.17.0)

The report says:

12:02:37 PM: ModuleNotFoundError: Module not found: Error: Can't resolve '_http_common' in '/opt/build/repo/node_modules/@prisma/client/runtime'
12:02:37 PM: > Build error occurred
12:02:37 PM: Error: > Build failed because of webpack errors
12:02:37 PM:     at /opt/build/repo/node_modules/next/dist/build/index.js:15:924
12:02:37 PM:     at async Span.traceAsyncFn (/opt/build/repo/node_modules/next/dist/telemetry/trace/trace.js:6:584)
12:02:37 PM: ​
12:02:37 PM: ────────────────────────────────────────────────────────────────
12:02:37 PM:   "build.command" failed                                        
12:02:37 PM: ────────────────────────────────────────────────────────────────
12:02:37 PM: ​
12:02:37 PM:   Error message
12:02:37 PM:   Command failed with exit code 1: next build
12:02:37 PM: ​
12:02:37 PM:   Error location
12:02:37 PM:   In Build command from Netlify app:
12:02:37 PM:   next build

How to reproduce

Try to deploy on netlify. Force NODE_VERSION 14.17.0 in environment variables
Prisma imported in the nextJs api, not directly in the pages

Expected behavior

No response

Prisma information

"prisma": "^2.28.0",
"@prisma/client": "^2.28.0",

Environment & setup

Netlify
NODE_VERSION 14.17.0

Prisma Version

prisma               : 2.28.0
@prisma/client       : 2.28.0
Current platform     : debian-openssl-1.1.x
Query Engine         : query-engine 89facabd0366f63911d089156a7a70125bfbcd27 (at node_modules/@prisma/engines/query-engine-debian-openssl-1.1.x)
Migration Engine     : migration-engine-cli 89facabd0366f63911d089156a7a70125bfbcd27 (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core 89facabd0366f63911d089156a7a70125bfbcd27 (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary        : prisma-fmt 89facabd0366f63911d089156a7a70125bfbcd27 (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : 89facabd0366f63911d089156a7a70125bfbcd27
Studio               : 0.417.0
@StartMeUp StartMeUp added the kind/bug A reported bug. label Jul 30, 2021
@StartMeUp
Copy link
Author

Update.
I don't get the error with Vercel

@pantharshit00
Copy link
Contributor

Closing in favour of #7539 which will remove dependency on _http_common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

2 participants