-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Cannot find module 'next/dist/server/next-server.js'. Turborepo + VercelCLI #48949
Comments
Removed the Turbopack label since it's related to production builds, which Turbopack does not support yet. |
Related issue: vercel/vercel#8794 |
#39432 (reply in thread) |
Right! thank you @jakeleventhal. This is definitely related to https://github.com/trappar/next-vercel-ssr-bug |
I have the same issue with turborepo and pnpm when deploy with vercel cli prebuilt. The pages with |
Should close this as a duplicate of vercel/vercel#8794 |
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #76~20.04.1-Ubuntu SMP Mon Mar 20 15:54:19 UTC 2023 Binaries: Node: 16.15.1 npm: 8.19.1 Yarn: 1.22.19 pnpm: 7.29.1 Relevant packages: next: 13.3.1 eslint-config-next: 13.2.4 react: 18.2.0 react-dom: 18.2.0 ----------------- Vercel CLI 28.20.0 28.20.0
Which area(s) of Next.js are affected? (leave empty if unsure)
Turbopack (--turbo)
Link to the code that reproduces this issue
https://github.com/MrDockal/nextjs-turbo-vercel-cli-issue
To Reproduce
/lambda
page and you'll get 500. The root page/
worksDescribe the Bug
Hello,
When I deploy a lambda function (page with getServerSideProps implemented) to Vercel using Vercel CLI + Turborepo + NextJs. The lambda throws an error: Cannot find module 'next/dist/server/next-server.js' (it could similar to this issue #39432)
There isn't node_modules folder at all
I tried to deploy the same Nextjs app outside the Turborepo and it works. As you see there is node_modules folder with all required dependencies now
I don't know if this is an issue with Next, Turborepo or Vercel CLI itself.
Thank you
Expected Behavior
I expect endpoint
/lambda
to return 200 with HTML codeWhich browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: