How to install an npm package from GitHub directly?

后端 未结 15 2285
失恋的感觉
失恋的感觉 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:31

    I tried npm install git+https://github.com/visionmedia/express but that took way too long and I wasn't sure that would work.

    What did work for me was - yarn add git+https://github.com/visionmedia/express.

提交回复
热议问题