With things like LESS and RequireJS, we’re starting to use Node.js’s npm
(think pip
for JavaScript) on every other project. However, installing Node.js globally means some dependencies are also installed globally, which might be a problem if different projects use different versions of the same packages. One solution is to install Node.js/npm inside your virtualenv, so here are the steps to get there:
First off, activate your virtualenv, and:
That’s it! Now you can install npm packages directly to your virtualenv path with npm install -g {package}
.