npm & Windows

Again, Windows can cause problems you would not have expected. In npm versions prior to 3, npm stores dependencies in deeply nested folder structures, causing errors on running ‘npm install’ such as

npm ERR! Error: EPERM: operation not permitted,
open '/var/www/my_longnamed_app/node_modules/

Obviously, this is a ridiculously long path and exceeds 260 characters – and Windows can’t handle that. Not sure why “they” (you know … MS…) came up with that idea, and why this is still not fixed in a modern OS like Windows 7 (I did not try versions above that). I guess it is just the pure essence of evil, the same diabolic power which brought the Internet Explorer amongst us. Let them burn, let them suffer, and let even pay money for it!

Even when you run npm on Linux in a VM on Windows with a Shared folder, you will still suffer from that. Oh, you beasts from the abyss, how … ok I’ll stop.

Luckily, npm3 supports flat dependencies, i.e. all dependencies are written into the top level of the node_modules folder. So if you run into the above problem, try

npm --version

If this still says 2.x, consider updating to npm3:

npm install -g npm

Delete your node_modules folder (not sure if this is really needed, but better go sure), then run

npm install

and all dependencies get installed without errors. Yay!

If you dare, you can have a look into the node_modules folder now. You’ll find loads of folders – the beauty of flat dependencies.

wget in Git Bash

As reported, the link is currently dead (Database connection error), so I post the original text here:

The msys shell that comes with a Windows install of Git has curl, which is an awesome little utility, but sometimes you want access to wget. The MinGW project on SourceForge has a build of wget ported to work with MinGW/MSys: download this archive, create a folder called /bin in your home directory, and extract wget.exe to that /bin folder. Since ~/bin should be in your MSys PATH (at least it was for me), this should let you run wget from any directory when using Git Bash.

Credit to’s page on creating a build environment for pointing me in the right direction

Original post:

Because sometimes you do need your wget 😉 Thanks Adam!

PyCmd & Console2 – Windows command prompt reloaded

Finally! A command prompt for Windows that doesn’t suck! Now the Linux guys have no reason to smile at (the) Windows (console) anymore.

It offers you a searchable(!) command history(!) and surely some other cool stuff, but I stopped reading at this point and directly installed it right away.

It integrates nicely with

which amongst other kick ass features allows multi tabs(!) and a not-totally-weird-and-counter-intuitive way to Copy & Paste text. Nice.

Just go to Settings > Console and select the PyCmd executable for “Shell”. If you want to define different tabs go to Settings > Tabs. This way you can also integrate MINGW32, the Linux bash emulator for Windows that comes shipped with Git for Windows.

Ultimate command prompt power unleashed. Sort of.