How to install an npm package from GitHub directly? -
trying install modules github results in:
enoent error on package.json.
easily reproduced using express:
npm install https://github.com/visionmedia/express
throws error.
npm install express
works.
why can't install github?
here console output:
npm http https://github.com/visionmedia/express.git npm http 200 https://github.com/visionmedia/express.git npm err! not package /home/guym/tmp/npm-32312/1373176518024-0.6586997057311237/tmp.tgz npm err! error: enoent, open '/home/guym/tmp/npm-32312/1373176518024-0.6586997057311237/package/package.json' npm err! if need help, may report log at: npm err! <http://github.com/isaacs/npm/issues> npm err! or email to: npm err! <npm-@googlegroups.com> npm err! system linux 3.8.0-23-generic npm err! command "/usr/bin/node" "/usr/bin/npm" "install" "https://github.com/visionmedia/express.git" npm err! cwd /home/guym/dev_env/projects_git/proj/somename npm err! node -v v0.10.10 npm err! npm -v 1.2.25 npm err! path /home/guym/tmp/npm-32312/1373176518024-0.6586997057311237/package/package.json npm err! code enoent npm err! errno 34 npm err! npm err! additional logging details can found in: npm err! /home/guym/dev_env/projects_git/proj/somename/npm-debug.log npm err! not ok code 0
because https://github.com/visionmedia/express
url of web page , not npm module. use flavor:
git+https://git@github.com/visionmedia/express.git
or flavor if need ssh:
git+ssh://git@github.com/visionmedia/express.git
Comments
Post a Comment