For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
solution>>>
The error message you are getting means that the Nodemon script file is blocked from running on your system because the PowerShell execution policy is set to Restricted
.
To fix this, you need to change the PowerShell execution policy to Allow local scripts to run without signing
. You can do this by following these steps:
Set-ExecutionPolicy RemoteSigned
Y
to confirm the change.Once you have changed the PowerShell execution policy, you should be able to start your Node.js application using the nodemon
command.
Here is an example of how to start an Express.js server using Nodemon:
nodemon app.js
Nodemon will then start watching your application files and restart your application whenever they change.
Note: If you are not familiar with PowerShell, you can also change the execution policy using the Group Policy Editor. To do this, follow these steps:
Windows
+ R
.gpedit.msc
and press Enter
.User Configuration > Administrative Templates > Windows Components > Windows PowerShell
Turn on Script Execution
policy.