I’m trying to create new React project but something is going wrong.
when I run in Git bush npx create-react-app app
I have got such Error :
npm ERR! Unexpected end of JSON input while parsing near '…"~0.35.0",“marked”:"0’
may somebody know how to fix it?
before it worked very well
Maybe reinstall node?.. npx is a node command so it could be your node setup is corrupted.
Just a thought.
npx is used in more recent versions of node, so updating it could do the trick.
Alternatively, I’ve came across in tutorials that you could use this instead
npm install -g create-react-app
reinstalled node.js no effect
tried npm install -g create-react-app react-app also no any effect
Going to try yarn
It’s working npm cashe clean --force
And the awesome thing is, it only took me around 30 seconds to google the error and find a solution