I am s SheCodes student learning React. I am using the recommended build commands (npm run build and build). I find that I can run x number of deploys with no problem but then follows a series of fails. Even if there is a syntax error that I subsequently correct, the build still fails. I turn off my laptop and go back to it after a few days and am successful. Then the cycle of fail/success begins again. Right now if you check my site above you’ll see my deploy log. I am frustrated and confused. What am I doing wrong?
Hi @jcedwards48 ,
Welcome to the community!
I took a look at the latest deploy log for your site and see this:
4:12:44 PM: $ CI= npm run build 4:12:44 PM: npm ERR! code ENOENT 4:12:44 PM: npm ERR! syscall open 4:12:44 PM: npm ERR! path /opt/build/repo/package.json 4:12:44 PM: npm ERR! errno -2 4:12:44 PM: npm ERR! enoent ENOENT: no such file or directory, open '/opt/build/repo/package.json' 4:12:44 PM: npm ERR! enoent This is related to npm not being able to find a file.
I believe this will help:
Thank you for trying but it still fails. I’ve removed both the Git and Netlify sites and will start again from scratch. Have a good evening.
OK, thanks for letting us know! Please ping again if you have any follow-up questions.