belmer
4/1/2016 - 7:54 AM

npm install from a github repository

Sometimes there are modules that you created or you forked from other developer and you modify it to fit your needs. 
I was on same exat scenario. The steps below will guide you on how to install modules in your application using link from github.

*Steps
1. Login to your github account
2. Go to your module repository
3. On your repository page there should be a button "Download ZIP".
--- Note: Others suggested that you can just copy the "https" or "ssh" link and do "npm install git+<https/ssh link>". 
However this does not worked for me. Going back to "Download ZIP" button. Right click it and "Copy Link Address" (Im using chrome browser by the way).
4. Before you do an npm install make sure you change some parts of your link.
5. The copied link that you have should have a ".zip" extension, remove it. Also, in your link change "archive" to "tarball".
6. Once step 5 is done. You can now do "npm install <paste your modified link here>. 
7. Your done!