Next.js: Cannot find module '../core-js/object/define-property'

Created on 18 Feb 2019  路  14Comments  路  Source: vercel/next.js

Question about Next.js

I want to try install next.js to start a project, but when I finished steps on tutorial, when I run npm run dev, I get a error 500 on my page by http://localhost:3000, and get error below:

image

my package.json like this:

 "dependencies": {
    "next": "^8.0.1",
    "react": "^16.8.2",
    "react-dom": "^16.8.2"
  },
    "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start"
  }

Is there need import babel/core-js manually?

Most helpful comment

I am getting this issue all over the place as well!

After I updated to NEXT 8.0.3

All 14 comments

I also encountered such a problem.

Please provide a reproduction when creating issues.

image
@timneutkens

That is not really a reproduction, please provide a repository or similar. I can't reproduce based on these 3 deps.

I will get an error when installing with cnpm, this error will not occur with npm锛宻orry for disturbance!

I will get an error when installing with cnpm, this error will not occur with npm锛宻orry for disturbance!

but I want to know which package will affect it

The same thing happened to me on this project. can you share some solutions to this problem? @ht1131589588

fortunately, I solved this problem with a downgraded version.
this is my packjson file:
image

I also met this problem. It was cnpm that couldn't. It was really unfriendly.

I also met this problem. It was cnpm that couldn't. It was really unfriendly.

i use yarn that solve that

why is this closed? I am also getting this issue with next 8 and pnpm.

I am getting this issue all over the place as well!

After I updated to NEXT 8.0.3

It's babel's issue https://github.com/babel/babel/issues/9734#issue-423654875
I solved it by installing core-js
yarn add core-js --exact

The babel issue was closed with - "I'm closing this issue, since it is caused by a lot of packages which we don't control and which use core-js without specifying it in their deps."

Was this page helpful?
0 / 5 - 0 ratings