Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Running scripts is disabled on this system on Windows (solution)

Malcolm

Administrator
Administrator
Staff Team
Code+
Hi folks,

Recently, I ran into an issue where I was not able to run nodemon. It's an NPM package for node.js that automatically restarts the node server when it detects any new changes. This was due to my computer's strict policy on running scripts (it never did before 🙄).

So here's the error message you might see:
Code:
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.

Solution:
In Powershell run:
Code:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser

This will change the Execution Policy to be unrestrictive for the current user.
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom