Search code examples
javascriptnode.jsmacosnpmnodemon

How to install nodemon Nodejs on macOS? nodemon keeping show : command not found


Currently I already install nodemon with command npm install -g nodemon. And I got Permissions issue, so I do command with sudo npm install -g nodemon and i did it. But when I make "nodeman" command was always show nodemon: command not found.


Solution

  • If for any reasons you are unable to set a Global PATH then under your current project directory, run

    npm install nodemon --save-dev
    

    then under "scripts" in your package.json file, add "start": "nodemon app.js" like this -

    "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1",
        "start": "nodemon app.js"
    }
    

    then run

    npm start