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

Error: Cannot find module 'next/dist/shared/lib/is-plain-object.js' #30

Open
divikshrivastava opened this issue Feb 20, 2023 · 0 comments

Comments

@divikshrivastava
Copy link

divikshrivastava commented Feb 20, 2023

Hello everyone, I recently started working with Next js, and to begin I took a pull of a sample next js project . Now after doing npm install, and then starting the build I am getting below error.

`warn - Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration
info - Linting and checking validity of types
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data .Error: Cannot find module 'next/dist/shared/lib/is-plain-object.js'
Require stack:

  • /Users/root/Downloads/monster-admin-nextjs-free/.next/server/pages/_document.js
  • /usr/local/lib/node_modules/next/dist/server/require.js
  • /usr/local/lib/node_modules/next/dist/server/load-components.js
  • /usr/local/lib/node_modules/next/dist/export/worker.js
  • /usr/local/lib/node_modules/next/dist/build/worker.js
  • /usr/local/lib/node_modules/next/dist/compiled/jest-worker/processChild.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at mod._resolveFilename (/usr/local/lib/node_modules/next/dist/build/webpack/require-hook.js:23:32)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at 8524 (/Users/root/Downloads/monster-admin-nextjs-free/.next/server/pages/_document.js:812:18)
    at webpack_require (/Users/root/Downloads/monster-admin-nextjs-free/.next/server/webpack-runtime.js:25:42)
    at 2498 (/Users/root/Downloads/monster-admin-nextjs-free/.next/server/chunks/498.js:15:22)
    at webpack_require (/Users/root/Downloads/monster-admin-nextjs-free/.next/server/webpack-runtime.js:25:42)
    at 623 (/Users/root/Downloads/monster-admin-nextjs-free/.next/server/pages/_document.js:22:39) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/root/Downloads/monster-admin-nextjs-free/.next/server/pages/_document.js',
    '/usr/local/lib/node_modules/next/dist/server/require.js',
    '/usr/local/lib/node_modules/next/dist/server/load-components.js',
    '/usr/local/lib/node_modules/next/dist/export/worker.js',
    '/usr/local/lib/node_modules/next/dist/build/worker.js',
    '/usr/local/lib/node_modules/next/dist/compiled/jest-worker/processChild.js'
    ]
    }

Build error occurred
Error: Failed to collect page data for /ui/grid
at /usr/local/lib/node_modules/next/dist/build/utils.js:963:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'Error'
}
`

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

No branches or pull requests

1 participant