I have used the command to install npm package into my visual studio code for that, fire a command into my terminal, npm install -g create-react-app but, I am getting errors. enter image description here
It's basically saying that Powershell's execution policy does not allow running.ps1 scripts. When you run npm install, it tries to execute
You can solve this in two ways:
I suggest you take a look at this answer for switching from powershell to command prompt: Visual Studio Code, how to switch from powershell.exe to cmd.exe
Open powershell as administrator, then type the following command in thereSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
This will set the execution policy and allow executing remotely signed (third party) scripts, which means NPM can be run.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.