How to install an npm package from GitHub directly?

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

    Install it directly:

    npm install visionmedia/express
    

    Alternatively, you can add "express": "github:visionmedia/express" to the "dependencies" section of package.json file, then run:

    npm install
    

提交回复
热议问题