Trying to install modules from github results in:
ENOENT error on package.json.
Easily reproduced using express:
The methods are covered pretty well now in npm's install documentation as well as the numerous other answers here.
npm install git+ssh://git@github.com:/]
npm install git+ssh://git@github.com:/[#semver:^x.x]
npm install git+https://git@github.com//
npm install git://github.com//
npm install github:/[#]
However, something notable that has changed recently is npm adding the prepare
script to replace the prepublish
script. This fixes a longstanding problem where modules installed via git did not run the prepublish
script and thus did not complete the build steps that occur when a module is published to the npm registry. See https://github.com/npm/npm/issues/3055.
Of course, the module authors will need to update their package.json to use the new prepare
directive for this to start working.