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

Cannot find module 'server/next-server' on vercel (11.0.2-canary.4) #26881

Closed
gu-stav opened this issue Jul 2, 2021 · 2 comments
Closed

Cannot find module 'server/next-server' on vercel (11.0.2-canary.4) #26881

gu-stav opened this issue Jul 2, 2021 · 2 comments
Labels
bug Issue was opened via the bug report template.

Comments

@gu-stav
Copy link

gu-stav commented Jul 2, 2021

What version of Next.js are you using?

11.0.2-canary.4

What version of Node.js are you using?

14

What browser are you using?

not relevant

What operating system are you using?

not relevant

How are you deploying your application?

next build

Describe the Bug

When running next build on vercel the following error is thrown:



20:22:28.588 | Error: Cannot find module 'next/dist/next-server/server/next-server'
-- | --
20:22:28.588 | Require stack:
20:22:28.588 | - /vercel/path0/noop.js
20:22:28.588 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
20:22:28.588 | at o (/vercel/0ade7bda7c20c71d/.build-utils/.builder/node_modules/@vercelruntimes/next/dist/index.js:1:568658)
20:22:28.588 | at a (/vercel/0ade7bda7c20c71d/.build-utils/.builder/node_modules/@vercelruntimes/next/dist/index.js:1:568769)
20:22:28.588 | at Object.e.exports [as default] (/vercel/0ade7bda7c20c71d/.build-utils/.builder/node_modules/@vercelruntimes/next/dist/index.js:1:568792)
20:22:28.588 | at Object.serverBuild (/vercel/0ade7bda7c20c71d/.build-utils/.builder/node_modules/@vercelruntimes/next/dist/index.js:1:629702)
20:22:28.588 | at Object.build (/vercel/0ade7bda7c20c71d/.build-utils/.builder/node_modules/@vercelruntimes/next/dist/index.js:1:606215)
20:22:28.588 | at buildStep (/var/task/webpack:/@zeit/api/scripts/build-container/src/utils/purpose-build.ts:164:1) {
20:22:28.588 | code: 'MODULE_NOT_FOUND',
20:22:28.588 | requireStack: [ '/vercel/path0/noop.js' ]
20:22:28.588 | }

It doesn't happen locally. I have disabled the build cache and ran a deployment multiple times. Could be related to #26734

Expected Behavior

The build should succeed.

To Reproduce

As an example you can use: https://vercel.com/seebruecke-org/frontend/Gg6EPQgVy3zCMak2BHGrdGNYFWjp

You'll find the error at the end of the logs. Please ignore the GraphQL error logs.

@gu-stav gu-stav added the bug Issue was opened via the bug report template. label Jul 2, 2021
@gu-stav
Copy link
Author

gu-stav commented Jul 2, 2021

Duplicate of #26868

@gu-stav gu-stav closed this as completed Jul 2, 2021
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants