close

[Solved] nodemon.ps1 cannot be loaded because running scripts is disabled on this system

Are You Facing the Following error nodemon.ps1 cannot be loaded because running scripts is disabled on this system in Nodejs? Then You are in right place. In this article, we will try to figure out how this error occurs and what are the possible fixes for this error. First of all, let’s explore how this error occurs.

What is nodemon.ps1 cannot be loaded because running scripts is disabled on this system error?

I am trying to run nodemon in my Windows But I am facing the following error.

nodemon.ps1 cannot be loaded because running scripts is disabled on this system

How To Fix nodemon.ps1 cannot be loaded because running scripts is disabled on this system Error?

  1. How To Fix nodemon.ps1 cannot be loaded because running scripts is disabled on this system Error?

    To Fix nodemon.ps1 cannot be loaded because running scripts is disabled on this system Error You need to set RemoteSigned -Scope for the current users. First of all, Open Your PowerShell with the Administrator Access. And Run this command: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser And now You are able to run nodemon script without any error.

  2. nodemon.ps1 cannot be loaded because running scripts is disabled on this system

    You are facing this error because of ExecutionPolicy is set to Restricted and thats why this error is occurs To Fix nodemon.ps1 cannot be loaded because running scripts is disabled on this system error you just need to Set-ExecutionPolicy Unrestricted. Open Your PowerShell with the Administrator Access. And Run this command: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser And now, your error will be solved.

Solution 2: Set ExecutionPolicy

You are facing this error because of ExecutionPolicy is set to Restricted and thats why this error is occurs To Fix nodemon.ps1 cannot be loaded because running scripts is disabled on this system error you just need to Set-ExecutionPolicy Unrestricted. Open Your PowerShell with the Administrator Access. And Run this command.

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

And now, your error will be solved.

Solution 2: Set RemoteSigned -Scope

You need to set RemoteSigned -Scope for the current users. First of all, Open Your PowerShell with the Administrator Access. And Run this command.

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

And now You are able to run nodemon script without any error.

Solution 3: Delete nodemon.ps1

  1. First of all Open this folder C:\Users\Dell\AppData\Roaming\npm
  2. and then Find file nodemon.ps1 
  3. Just delete this file and run nodemon
  4. Now, your error will be solved.
  5. Thanks.

Conclusion

It’s all About this error. I hope We Have solved Your error. Comment below Your thoughts and your queries. Also, Comment below on which solution worked for you.

Also, Read

Leave a Comment