Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieving Node.js Module from GitHub - Error: ENOENT, open package/package.json'

Tags:

node.js

npm

To my understanding, the 'npm' knows about git, so i can use it to retrieve Node.js modules from github. So, I have created Node.js module and hosted it at github. When I try to install it in my Node.js project as following:

npm install git://github.com/git-user/repo.git

then i am getting following error:

 Error: ENOENT, open '/Users/kapa/tmp/npm-12237/1371351143597-0.9469406655989587/package/package.json'
...
code ENOENT
npm ERR! errno 34

What am i doing wrong and how to install module from github? Thank You

like image 425
latvian Avatar asked Jun 16 '13 03:06

latvian


2 Answers

Does your repository contain a proper package.json file? That is required to have your repository handled as an npm module.

like image 162
Peter Lyons Avatar answered Oct 18 '22 04:10

Peter Lyons


You may be using a .zip file. NPM doesn't support it and it may throw an error. Here is what you can use: https://npmjs.org/doc/install.html#DESCRIPTION

like image 41
matsko Avatar answered Oct 18 '22 05:10

matsko