0

I have been trying to install or create a react app but I kept getting this error message " npm ERR! Unexpected end of JSON input while parsing near '...5VmmIPyPaAPmy1Iv3blBY'"

Also: npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Madu Emmanuel IP\AppData\Roaming\npm-cache_logs\2020-10-13T11_40_59_715Z-debug.log

  • 2
    that's not enough context... what are you getting prior to the error? What is the full error message? What compiler are you using? –  Oct 13 '20 at 11:55
  • Does this answer your question? [NPM Install Error:Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'](https://stackoverflow.com/questions/47675478/npm-install-errorunexpected-end-of-json-input-while-parsing-near-nt-webpack) – Ieshaan Saxena Oct 13 '20 at 11:57

1 Answers1

1

Go to your Command Prompt, cd into the desired folder and write:

npm i -g create-react-app

Once done, write:

npx create-react-app <project-name>

It should work perfectly.

Sagi Rika
  • 2,839
  • 1
  • 12
  • 32
  • 1
    You don't need to install `create-react-app` globally for `npx` to work – matrixersp Oct 13 '20 at 11:57
  • You still should though. No need to include create-react-app in any dependency – Sagi Rika Oct 13 '20 at 11:58
  • 1
    @SagiRika AFAIK npx will search for the package in the local and global registry and if it's not found, it will download the package and but only cache it, not add it as a dependency. – matrixersp Oct 14 '20 at 09:06