I am trying to use npx create-react app but i have errors that is shown below:
npm ERR! Unexpected end of Json input w
The problem arises due to so many reasons.
if your antivirus is your issue, disable it for the period you run the commands.
Whatever the reason for npx create-react-app is not working on your machine, run the following commands in sequence:
npm cache clean --force
npx create-react-app my-app
let me know if this worked for you
First, clear cache by typing this in your terminal:
npm cache clean --force
Then upgrade your version of npm by either following these steps or type:
npm install -g npm@next
Now go to "NodeJS" in Programs and Features in your Windows settings and Repair your installation.
Restart terminal and type:
npx create-react-app my-app
This should hopefully fix your issue.
Run Windows PowerShell as administrator and type this:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
In your antivirus whitelist the node software
hey guys in my point of view, check your system any antivirus is running and blocking the node.exe more specifically (ByteFence Anti-malware)
In my case its blocking the node system call
I quit this from hidden icons in the system tray it works fine for me
when you do
npm start
This worked for me!!
first you need to create the package.json file by
npm init
then
npx create-react-app myapp
this should fix the issue.