JTCon
JTCon

Reputation: 509

NPM return “bash command not found” when I try to get a package version

I have installed the package.json that includes nodemon package (and others)

#npm list --depth 0

├─┬ [email protected]

but the command #nodemon -v return a -bash error: "nodemon command not found”

I cant start my server.js with nodemon, the same error, but all works with #node server.js

Any idea? Thnks

Upvotes: 1

Views: 129

Answers (1)

axtck
axtck

Reputation: 3965

With a local install

You can use npx nodemon filename.js

If you want to install it globally

With npm npm install nodemon -g or with yarn yarn global add nodemon, that way you can use nodemon directly (nodemon filename.js)

Upvotes: 1

Related Questions