Just stop your node server in "task manager", and start. After that try to install with npx or npm.

Hope it is useful.


Don't worry, I also got this error. This error comes when you try to write the command create-react-app

when you type the command npm install -g create-react-app, after running this command you should restart the command prompt or command powershell whatever you are using. After restarting command prompt now you can type create-react-app cmd.


if you're a Windows OS user open your Powershell and paste the following command on your PowerShell cmd -> set-executionpolicy remotesigned.


  • run cmd as adminstrator then
  • cd to the folder you want to create the app in it and type the following

    create-react-app myapp

    this worked for me


Simply run Power shell as administrator then execute the command:set-executionpolicy remotesigned


This error comes because Microsoft changed some PowerShell execution policies for your security.

We can create react app from mainly two places.

  1. Command Prompt - You can easily create new react project without facing any issue.
  2. Powershell terminal in Visual code - If you not disables new policies of powershell yet then you will face such problem. You need follow some steps to disable these security features.
  • Run power shell as administrator
  • Type set-executionpolicy remotesigned
  • There will be 5 options.
  • You need to type Y (for [Y] Yes) and click Enter button.
  • Now you will be able to create react app in your visual code.

Hope it will work for you.


try this command : npx create-react-app yourappname


Run power shell as admin

  1. Windows Start
  2. Search for "Windows Powershell"
  3. Right click Windows Powershell
  4. Click Run as Administrator (Grant in "User Account Control" if shows up)
  5. Type set-executionpolicy remotesigned
  6. Select/Type yes [Y]


Make sure you remove create-react-app from npm globally and use npx create-react-app {project_name} to generate a react app.

npm uninstall --global create-react-app
npx create-react-app sample

also, make sure that your npm version is after 5.2 while doing these.


I think you are using Windows, I came across the same problem and it's because of a security feature in your system.

  1. Open powershell as an administrator.
  2. Run the following command set-executionpolicy remotesigned
  3. Try again.

This worked for me.


Related Query

More Query from same tag