Error when trying to rum npm start command
I've found some possible solutions. Seems that you are using powershell, check firstly that you have it in your PATH as %SystemRoot%/system32/WindowsPowerShell/v1.0. After that open powershell as admin and write
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
It should help in case there is problem with powershell. OR, sometimes it could be an error while cra dev server is trying to open web browser. Someone on github said that this helped him:
This error stems from the fact that CRA tries to open your browser: In order to skip opening the browser, add
BROWSER=none
to your .env or .env.local file
Another way is to downgrade react scripts for project with these commands
npm install [email protected]
npm start
Goto > Control Panel\System and Security\System\Advance system setting\Enviroment variable and set system variables path C:\Windows\System32\ variable and restart your System.
1- First you need to edit system environment variable and locate where you have Windows Poweshell so add new in "system environment variable path"
2- Then Open Window PoweShell as An Administraror And Write these Two Commands :
:) Upgrade Window PowerShell because your nodejs and npm is updated but powershell is not updated so its making conflict with your npm start or expo start,so you should need to upgrade windows powershell
And Then run Cmd and also run your poject npm start or expo start so quickly it will work!
BEST OF LUCK!