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?
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.
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
- First of all Open this folder C:\Users\Dell\AppData\Roaming\npm
- and then Find file nodemon.ps1
- Just delete this file and run nodemon
- Now, your error will be solved.
- 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
- Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (88)
- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension “.ts”
- BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default
- npm ERR! could not determine executable to run
- dynamic import() which is available in all commonjs modules