Question:
Trying to install modules from GitHub results in this error: ENOENT error on package.json.
Easily reproduced using express:
npm install https://github.com/visionmedia/express
throws error.
npm install express
works.
Why can’t I install it from GitHub?
Answer:
Because https://github.com/visionmedia/express
is the URL of a web page and not an npm module. Use this flavor: git+{url}.git
1 2 |
git+https://github.com/visionmedia/express.git |
or this flavor if you need SSH:
1 |
git+ssh://git@github.com/visionmedia/express.git |