DEV Community

loading...
Cover image for How to fix nodemon error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system

How to fix nodemon error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system

singhanuj620 profile image Anuj Singh ・1 min read

Error_Img

The problem here is with "Get-ExecutionPolicy" value is Restricted. We have to change it to Unrestricted

Step 1
Open Windows PowerShell with Run As Administrator

Step 2
Execute the following command

Get-ExecutionPolicy

The result you will see is Restricted
1

Step 3
Execute the following command

Set-ExecutionPolicy Unrestricted

2

Done
3

and it's fixed 🤗🤗🤗🤗
4

Discussion (2)

pic
Editor guide
Collapse
dbarwikowski profile image
Daniel Barwikowski

Yes, but actually no. It might not work in your workstation. Depends on the policy of your domain.

Collapse
singhanuj620 profile image
Anuj Singh Author

I agree, but this can be one of the solutions.