Next JS build on Vercel Failed: Module not found

Viewed 809

I tried to put my GitHub repo into Vercel but while building it failed.

enter image description here

This is a custom component created by me.

And my package.json looks like the below.

{
  "name": "learn-starter",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "@material-ui/core": "^4.12.3",
    "@material-ui/icons": "4.11.2",
    "@zeit/next-sass": "^1.0.1",
    "next": "^11.0.0",
    "node-sass": "^4.14.1",
    "react": "17.0.2",
    "react-dom": "17.0.2"
  }
}

Can someone help me with what is wrong?

1 Answers

The problem is Git. It somehow fetches index.js as Index.js. So, I just reverted and change into index.js and push it again. This solves my issue.

Related