reactjsnode.jsserverlocalhostlocal

React application on local host/server Issue, I have also also installed the latest npm package of node.js locally


I am attaching the error below which is throwing on my terminal of visual studio code, I am trying to run application locally through visual studio code window..

npm : File C:\Program Files\nodejs\npm.ps1 cannot be loaded. The file C:\Program Files\nodejs\npm.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1

I have installed the latest version of node.js and also updated the environment varialble for the node.js path but the error remain stick/same to the visual studio local console/terminal window.


Solution

  • Open powershell and run this command: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine