James Carr | Rants and Musings of an Agile Developer

Jan/12

29

NPM: Install Packages Not Yet Published

This morning I was working on a project and one of the modules I depended on had a small bug in it. As I was about to log an issue on the project’s github page I discovered that it was already fixed, just not yet released. I really wanted to push my changes out to our staging server and my build process relies on npm gathering all the dependencies my project needs, so I looked for ways to install through npm without much modification to my build process.

What I discovered could be considered an abuse of npm’s preinstall hook, but it works.

This brings in not just the module, but also all of the module’s transitive dependencies as well. This trick worked for me, but I’m still a little doubtful that this is considered the “right” way around the problem. :)

No tags

1 comment

Leave a Reply

<<

>>

Theme Design by devolux.nh2.me