You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The app runs normally with Next 11.1.0
But after updating to Next 12, it runs fine on local, even deploys successfully, but the app is crashing when visited
The error logs on Vercel shows this
[GET] /
08:29:41:23
2021-10-27T02:59:43.514Z d7ab2a6b-1181-4326-8a48-2039f292a92b ERROR Error: Cannot find module '/var/task/node_modules/next/dist/server/next.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:320:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:533:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:875:27)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/var/task/node_modules/@sentry/nextjs/dist/utils/instrumentServer.js:7:14)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32) {
code: 'MODULE_NOT_FOUND',
path: '/var/task/node_modules/next/package.json',
requestPath: 'next'
}
2021-10-27T02:59:43.515Z d7ab2a6b-1181-4326-8a48-2039f292a92b ERROR Error: Cannot find module '/var/task/node_modules/next/dist/server/next.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:320:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:533:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:875:27)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/var/task/node_modules/@sentry/nextjs/dist/utils/instrumentServer.js:7:14)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32) {
code: 'MODULE_NOT_FOUND',
path: '/var/task/node_modules/next/package.json',
requestPath: 'next',
page: '/'
}
RequestId: d7ab2a6b-1181-4326-8a48-2039f292a92b Error: Runtime exited with error: exit status 1
Runtime.ExitError
The app should run normally as it does with Next 11.1.0
To Reproduce
This is a private repo. And I haven't been able to reduce it to minimum code to reproduce this issue.
But downgrading from Next 12 to Next 11.1.0 makes it runs fine
The text was updated successfully, but these errors were encountered:
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
locked as resolved and limited conversation to collaborators
Jan 27, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
12.0.0
What version of Node.js are you using?
14.15.4
What browser are you using?
chrome
What operating system are you using?
macOS
How are you deploying your application?
Vercel
Describe the Bug
The app runs normally with Next 11.1.0
But after updating to Next 12, it runs fine on local, even deploys successfully, but the app is crashing when visited
The error logs on Vercel shows this
This is my
next.config.js
Expected Behavior
The app should run normally as it does with Next 11.1.0
To Reproduce
This is a private repo. And I haven't been able to reduce it to minimum code to reproduce this issue.
But downgrading from Next 12 to Next 11.1.0 makes it runs fine
The text was updated successfully, but these errors were encountered: