How to install an npm package from GitHub directly?

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

    The current top answer by Peter Lyons is not relevant with recent NPM versions. For example, using the same command that was criticized in this answer is now fine.

    $ npm install https://github.com/visionmedia/express
    

    If you have continued problems it might be a problem with whatever package you were using.

提交回复
热议问题