This is a simple solution for solving this error on windows
>nodemon : File C:\Users\hp\AppData\Roaming\npm\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.
At line:1 char:1
+ nodemon app
+ ~~~~~~~
First Step
First search and run PowerShell as administrator
Second Step
If you read through the error message you will see this error was generated from Execution_Policies. In you powershell window type and enter the get execution policiy command.
Get-ExecutionPolicy
Final Step
After running the command it will return restricted as the result. We have to set the execution policy to unrestricted using the Set-ExecutionPolicy command.
Set-ExecutionPolicy Unrestricted
After this you will get a prompt message. Press Y to change it.
To be sure you have changed the get execution policy you can simply run it again to check the result. You'll get the output 'Unrestricted'
Now you can use nodemon on your machine.
Top comments (7)
Thank you, I did it
Thanks For the soluation.
You are welcome
What caused the issue in the first place? I dont seem to recognise this.
thanks a lot
What happen actually can you explain please ?
its work thanks for that...
thank you bro