DEV Community


How to Fix Nodemon (nodemon.ps1) Cannot Be Loaded Because Running Scripts is Disabled on This System.

Jumbo Daniel
・1 min read

This is a simple solution for solving this error on windows

>nodemon : File C:\Users\hp\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:/
At line:1 char:1
+ nodemon app
+ ~~~~~~~

Enter fullscreen mode Exit fullscreen mode

First Step
First search and run PowerShell as administrator

Second Step
If you read through the error message you will see this error was generated from Execution_Policies. In you powershell window type and enter the get execution policiy command.


Enter fullscreen mode Exit fullscreen mode

Final Step
After running the command it will return restricted as the result. We have to set the execution policy to unrestricted using the Set-ExecutionPolicy command.

Set-ExecutionPolicy Unrestricted

Enter fullscreen mode Exit fullscreen mode

After this you will get a prompt message. Press Y to change it.
To be sure you have changed the get execution policy you can simply run it again to check the result. You'll get the output 'Unrestricted'

Now you can use nodemon on your machine.

Discussion (0)