How to install an npm package from GitHub directly?

后端 未结 15 2371
失恋的感觉
失恋的感觉 2020-11-22 06:48

Trying to install modules from github results in:

ENOENT error on package.json.

Easily reproduced using express:

15条回答
  •  攒了一身酷
    2020-11-22 07:28

    You can also do npm install visionmedia/express to install from Github

    or

    npm install visionmedia/express#branch
    

    There is also support for installing directly from a Gist, Bitbucket, Gitlab, and a number of other specialized formats. Look at the npm install documentation for them all.

提交回复
热议问题