I am trying to deploy Nextjs app to Vercel. I am getting this error: “Error: Cannot find module ‘/vercel/path0/.next/server/app/index/page_client-reference-manifest.js'”
i have tried everything but nothing changed.
i tried Delete node_modules and run yarn install.
Then do yarn build.
Then deploy
tried to use Vercel cli
nothing seems to work.
here is the error log
[15:32:30.569] info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
[15:32:30.570] Collecting page data ...
[15:32:31.474] Error: Cannot find module '/vercel/path0/.next/server/app/index/page_client-reference-manifest.js'
[15:32:31.475] Require stack:
[15:32:31.475] - /vercel/path0/node_modules/next/dist/server/load-components.js
[15:32:31.475] - /vercel/path0/node_modules/next/dist/build/utils.js
[15:32:31.476] - /vercel/path0/node_modules/next/dist/build/worker.js
[15:32:31.476] - /vercel/path0/node_modules/next/dist/compiled/jest-worker/processChild.js
[15:32:31.476] at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
[15:32:31.476] at /vercel/path0/node_modules/next/dist/server/require-hook.js:55:36
[15:32:31.476] at Module._load (node:internal/modules/cjs/loader:922:27)
[15:32:31.476] at Module.require (node:internal/modules/cjs/loader:1143:19)
[15:32:31.476] at mod.require (/vercel/path0/node_modules/next/dist/server/require-hook.js:65:28)
[15:32:31.476] at require (node:internal/modules/cjs/helpers:119:18)
[15:32:31.476] at loadClientReferenceManifest (/vercel/path0/node_modules/next/dist/server/load-components.js:43:72)
[15:32:31.477] at loadComponentsImpl (/vercel/path0/node_modules/next/dist/server/load-components.js:65:29)
[15:32:31.477] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[15:32:31.477] at async /vercel/path0/node_modules/next/dist/build/utils.js:1077:32 {
[15:32:31.477] code: 'MODULE_NOT_FOUND',
[15:32:31.477] requireStack: [
[15:32:31.477] '/vercel/path0/node_modules/next/dist/server/load-components.js',
[15:32:31.477] '/vercel/path0/node_modules/next/dist/build/utils.js',
[15:32:31.478] '/vercel/path0/node_modules/next/dist/build/worker.js',
[15:32:31.478] '/vercel/path0/node_modules/next/dist/compiled/jest-worker/processChild.js'
[15:32:31.478] ]
[15:32:31.478] }
[15:32:31.478]
[15:32:31.478] > Build error occurred
[15:32:31.481] Error: Failed to collect page data for /index
[15:32:31.481] at /vercel/path0/node_modules/next/dist/build/utils.js:1220:15
[15:32:31.481] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[15:32:31.481] type: 'Error'
[15:32:31.481] }
[15:32:31.566] error Command failed with exit code 1.
[15:32:31.567] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[15:32:31.588] Error: Command "yarn run build" exited with 1
[15:32:32.308]
I have tried
Delete node_modules and run yarn install.
Then do yarn build.
Then deploy
also tried to use Vercel cli