What's up guys, in this video session i will explain you how you can fix this error message in this tutorial.
Follow
Error on terminal: nodemon.ps1 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.
I have a solution to fix the issue by this way
- Open Windows PowerShell with Run as Administrator
- Run this command: Set-ExecutionPolicy Unrestricted
That solves the issue, but this way the system shows Security Risk Warning. My question: Is there any other way to solve this without security risk? Target is to use nodemon.
For those who are not aware of how to solve this error using Windows PowerShell
- Open PowerShell (Run As Administrator)
- Check the current execution policy using this command
Get-ExecutionPolicy
# You should get 'Restricted'
- Run this command to make it 'Unrestricted'
Set-ExecutionPolicy Unrestricted
- Check again whether execution policy changed by running this command
Get-ExecutionPolicy
# You should get 'Unrestricted'
- Now try to run nodemon on your project
nodemon 'filename.js'