0

I run the following command in my terminal:

npm install -g nodemon

but whenever i starting nodemon by nodemon index.js , it's showing me the following error:

nodemon : File C:\Users\****\****\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 index.js

CategoryInfo          : SecurityError: (:) [], PSSecurityException
FullyQualifiedErrorId : UnauthorizedAccess
> 

My package.json file is:

{
  "name": "gfg-express",
  "version": "1.0.0",
  "description": "How to connect express with mongodb atlas",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Greyhat07",
  "license": "ISC",
  "dependencies": {
    "express": "^4.18.2"
  }
}

solution, that is how to solve this problem

  • Does this answer your question? [PowerShell says "execution of scripts is disabled on this system."](https://stackoverflow.com/questions/4037939/powershell-says-execution-of-scripts-is-disabled-on-this-system) – code Dec 11 '22 at 05:45
  • Don't need to install nodemon from node 18. Use node --watch index.js – Anil kumar Dec 11 '22 at 09:16

0 Answers0