How to install an npm package from GitHub directly?


Trying to install modules from GitHub results in this error: ENOENT error on package.json.

Easily reproduced using express:

npm install throws error.

npm install express  works.

Why can’t I install it from GitHub?


Because is the URL of a web page and not an npm module. Use this flavor: git+{url}.git

or this flavor if you need SSH:

Leave a Reply