nodemon not found in npm

前端 未结 29 1504
终归单人心
终归单人心 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


    Had the same problem otherwise was just working fine a day ago. Very simple fix first check if nodemon exists on your system globally or not

    To check

    npm list -g --depth=0
    

    If you don't see then install it npm install -g nodemon (g stands for globally)
    If you see it still doesn't work then you need to configure environment variable I use Windows OS. On Windows navigate to

    Control panel>System>Advanced System Settings>Environment Variables>double-click on PATH
    

    Now check if you have this PATH C:\Users\yourUsername\AppData\Roaming\npm
    If not, you will see some existing paths, just append to it separating with semicolon. That's it! Worked for me. For me node was installed in C:..\Roaming\npm and for you if the PATH is different, you will put in whatever applcable.

提交回复
热议问题