Search code examples
node.jsnpmpm2forevernodemon

npm cannot install pm2 or nodemon in Windows 10


I try to install a nodemon for the auto-restart nodejs server when my file has been changed. But I got two warnings so, I try to install other npm packages like forever or pm2, but I still get the same warning. Here is my warning capture:

warning from npm install


Solution

  • Try,

    npm cache clear -f 
    

    and,

    npm install pm2 -g --unsafe-perm