Issues building with a next.js application

Hello, I am having some issues building my next.js application. It works fine locally, but when I go to build it on netlify I keep getting this error code. I have tried to modify the build settings on netlify to “CI= npm run build”

Also have tried to change the env variables to “CI= false” and still having issues.

This is my build log. Hope I can get some help with this! Thanks in advance

and this is my package.json

{
“name”: “nextjs-app”,
“version”: “0.1.0”,
“private”: true,
“scripts”: {
“dev”: “next dev”,
“build”: “next build”,
“start”: “next start”,
“lint”: “next lint”
},
“dependencies”: {
@popperjs/core”: “^2.11.8”,
“bootstrap”: “^5.3.3”,
“next”: “^14.2.3”,
“popper.js”: “^1.16.1”,
“react”: “^18.3.1”,
“react-apexcharts”: “^1.4.1”,
“react-countup”: “^6.5.3”,
“react-dom”: “^18.3.1”,
“react-intersection-observer”: “^9.10.2”,
“react-timer-hook”: “^3.0.7”,
“react-use”: “^17.5.0”,
“sass”: “^1.77.2”,
“swiper”: “^11.1.3”
},
“devDependencies”: {
@types/node”: “^20”,
@types/react”: “^18”,
@types/react-dom”: “^18”,
“eslint”: “^8”,
“eslint-config-next”: “14.2.3”,
“typescript”: “^5”
}
}

Hi @error,

Thanks for reaching out and welcome to Netlify’s Support Forums!

Would you be able to provide the sitename where you’re trying to deploy the Next.js app to? For example, sitename.netlify.app.

We have Netlify docs which explains the typical Next.js build commands here:

Could you give that a read and check your build settings?