1

I'm trying to deploy a next.js app to netlify and trying to get the output folder but when I run "npm run build" I get an error like: Error: > Build failed because of webpack errors at build (C:\Users\Owner\Desktop\port_frontend\node_modules\next\dist\build\index.js:15:918)

3 Answers3

0

Try to install package again, you hvn't update the latest;

npm install
npm run build

OR

yarn install
yarn build
Wilker
  • 551
  • 2
  • 6
  • 21
0

For my case, delete node_modules folder, and run yarn install works for me

-1

change import next/App to lowercase ,it works for me

feiyu
  • 1