I'm trying to run nodemon, but when I do, it gives me the following error:
nodemon : File C:\Users\dyzha\AppData\Roaming\npm\nodemon.ps1 cannot
be loaded because running scripts is disabled on this system. For
more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ nodemon app.js
+ ~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityExcep
tion
+ FullyQualifiedErrorId : UnauthorizedAccess
I've tried uninstalling it and reinstalling it, npm install -g nodemon
, and npm install nodemon --save-dev
.
I had the same issue, to resolve this:
Get-ExecutionPolicy
and press Enter
If the machine returns "Restricted"
Set-ExecutionPolicy Unrestrict
and press Enter
y
Now go to your terminal and try nodemon
again.
Type Get-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
, it will change the Get-ExecutionPolicy
to RemoteSigned
and allow you to run Nodemon.
Try to open Windows powerShell via cmd cmd => PowerShell_ISE
in the Powershell Type this PowerShell => Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
click yes
then try to open your nodemon
again, it should be working well Good luck
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.