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

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

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

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