I provisioned my VM on AWS using Chef and installed NodeJS using the NodeJS recipe (https://github.com/redguide/nodejs). When I do a global npm install of any package, I am not able to run that package using command line. Attached the screenshot below.
There are two options:
1)add the /usr/local/nodejs-binary-6.3.0/bin/
to PATH
variable.
Or
2)Run /usr/local/nodejs-binary-6.3.0/bin/http-server
.
The npm package binaries are not added to path by default. I would prefer option 2 to keep the path unpolluted