nodemon not working: -bash: nodemon: command not found

前端 未结 18 859
灰色年华
灰色年华 2021-01-30 03:45

I\'m on a Mac running El Capitan. I have node v5.6.0 and npm v3.6.0. When I try to run nodemon, I get:

-bash: nodemon: command not found

I th

18条回答
  •  爱一瞬间的悲伤
    2021-01-30 04:40

    in Windows OS run:

    npx nodemon server.js
    

    or add in package.json config:

    ...
    "scripts": {
        "dev": "npx nodemon server.js"
      },
    ...
    

    then run:

    npm run dev
    

提交回复
热议问题