nodemon not found in npm

前端 未结 29 1463
终归单人心
终归单人心 2020-12-24 10:17

I have a problem: nodemon does not run off the npm script (e.g. npm start),
but if nodemon is called on the command line outside the npm script, nodemon run

29条回答
  •  不思量自难忘°
    2020-12-24 10:50

    Here's how I fixed it :

    When I installed nodemon using : npm install nodemon -g --save , my path for the global npm packages was not present in the PATH variable .

    If you just add it to the $PATH variable it will get fixed.

    Edit the ~/.bashrc file in your home folder and add this line :-

    export PATH=$PATH:~/npm
    

    Here "npm" is the path to my global npm packages . Replace it with the global path in your system

提交回复
热议问题