When I try to run nodemon from terminal it's just throwing back as [...\npm\nodemon.ps1 cannot be loaded because running scripts is disabled on this system. ] How can I overcome this error and solve it
CodePudding user response:
Try to do these steps in order:
- run the terminal as administrator and then try the command
- If the above doesn't work, then type this command
set-executionpolicy remotesigned
- As a final resort, type this command if none of the steps work -
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
CodePudding user response:
You need to set the execution policy of your system.
Running Set-ExecutionPolicy -Scope CurrentUser Unrestricted
should solve your problem. Remember to run the command in an administrative powershell
You can view your current execution policy by running Get-ExecutionPolicy –List
in powershell
For more info, you can visit this