nodemon not found in npm

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

    You can resolve this problem by adding nodemon to your package.json:

    npm install nodemon --save-dev
    

    The problem happens when nodemon does not exist in /node_modules/.bin.

    Added --save-dev since it's required during development only.

    0 讨论(0)
  • 2020-12-24 10:51

    Install nodemon globally using following command. It works on my computer, and I'm sure it will work on your system also.

    npm install nodemon -g --save
    

    Sometimes you should have the permission to install it globally. It can be easily done by using following command.

    1. In LINUX UBUNTU: sudo npm install nodemon -g --save

    2. In Fedora:

      a) su
      b)npm install nodemon -g --save

    0 讨论(0)
  • 2020-12-24 10:51

    My nodemon vanished after installing babel (why?).

    Tried a lot of stuff. Here is how I solved it:

    sudo npm i -g nodemon
    

    Just reinstall it with sudo. Yeah.

    0 讨论(0)
  • 2020-12-24 10:53

    First install nodemon to your working folder by

    npm install nodemon
    

    Add the path of nodemon to the path variable of Environment Variable of System environment. In my case the path of nodemon was.

    C:\Users\Dell\Desktop\Internship Project\schema\node_modules\.bin
    

    It worked for me.

    0 讨论(0)
  • 2020-12-24 10:53

    You can always reinstall Node.js. When I had this problem, I couldn't fix it, but all I did was update the current version of Node. You can update it with this link: https://nodejs.org/en/download/

    0 讨论(0)
  • 2020-12-24 10:54

    Try to install nodemon globally.

    sudo npm install -g nodemon
    
    0 讨论(0)
提交回复
热议问题