3

I have been playing around with node.js and learning by playing with the Spotify API.

Spotify provided example source code which I have been building off but now I want to make my own thing.

There are many modules in node_module for use for their different examples and I obviously don't want any packages I am not using being hosted on my Git so I looking into my options and came across npm-check (https://www.npmjs.com/package/npm-check)

I did

npm install npm-check 

and it was successful

I then try to run the npm-check command in the folder my app.js is contained in like so

npm-check

I then get an error saying it is not a recognized command.

what am I missing?

TonyO
  • 199
  • 1
  • 14

1 Answers1

4

npm install only installs the npm module into the directory you are currently in., After running that command, you should see a node_modules directory with the npm-check module and all of it's dependencies.

To run npm check here, you would need to run /path/to/.bin/npm-check

If you would like to be able to run npm-check from any directory by simply running npm-check, you must first install it globally:

npm install -g npm-check

Anuj
  • 1,474
  • 12
  • 23