I'm completely at a loss. I have a React app I've been working on for some time and yesterday I found I was unable to build it. I keep getting the following error on 'npm run build': Creating an optimized production build... Failed to compile.
Unexpected end of JSON input
Steps I have taken:
I have created a new React project and was able to build without errors. I have taken all the packages from package.json in my problem project, pasted them into a new project and was able to build without error.
I'm not sure what to do now other than completely rebuild my project piece by piece.
I'm having the same issue for my react application since today and i think its a bug in the new NodeJs version. I fixed it by downgrading my version from 23.2.0 (newest at this time) to the LTS 22.11.0. Hope this will do the trick for you aswell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With