0
votes

I am new to reactjs . when i trid to install new reactjs app it shows following error.

Prathamesh@PRATHAMESH MINGW64 ~/Desktop/reactForm $ npx create-react-app form

Creating a new React app in C:\Users\Prathamesh\Desktop\reactForm\form.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template...

npm ERR! Unexpected end of JSON input while parsing near '...//registry.npmjs.org/'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Prathamesh\AppData\Roaming\npm-cache_logs\2020-03-30T19_34_56_684Z-debug.log

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json Deleting form/ from C:\Users\Prathamesh\Desktop\reactForm Done.

2
Can you post the package.json code please?Ngugi Kariuki

2 Answers

0
votes

Try clearing the NPM cache and try again.

npm cache clean --force
0
votes

I had the same problems and when I execute this command I received the following message:

npm WARN using --force I sure hope you know what you are doing.

the creation of my application still does not work