Hi @MiKalem898, based on your error message it seems you are trying to deploy a Nextjs site.
If possible can you share a repository of the site for me to help with the debugging?
Thanks.
Hi @MiKalem898, kindly change your build settings to the below Build command:next build && next export Publish directory:out
If you are getting the error in development on local computer, delete the package-lock.json file and then run the code below.
if you are using npm - npm install
if you are using yarn - yarn
It’s published ! I made a new site on Netlify because this wasn’t working and now its good ! But, I must replace the codes like routes.home by "/" or routes.passwordGenerator by "/password- ingenerator" ect, in my code because I have this error:
1:20:57 PM: ./Components/Links/Links.js
1:20:57 PM: Module not found: Can't resolve '../../Config/routes' in '/opt/build/repo/Components/Links'
1:20:57 PM: Import trace for requested module:
1:20:57 PM: ./pages/index.js
1:20:57 PM: ./Components/UI/Layout/Layout.js
1:20:57 PM: Module not found: Can't resolve '../../../Config/routes' in '/opt/build/repo/Components/UI/Layout'
1:20:57 PM: Import trace for requested module:
1:20:57 PM: ./pages/_app.js
1:20:57 PM: ./pages/_app.js
1:20:57 PM: Module not found: Can't resolve '../Config/routes' in '/opt/build/repo/pages'
1:20:57 PM: ./pages/index.js
1:20:57 PM: Module not found: Can't resolve '../Config/routes' in '/opt/build/repo/pages'
1:20:57 PM: > Build failed because of webpack errors