Windows filepath too long when deleting node_modules16 Sep 2014
I'm currently forced to develop on Windows. And it hurts. I feel like a clockmaker forced to work with gloves and blindfolded. I keep hitting strange and weird Windows limitations that are real productivity killers.
The most recent was not being able to delete a folder because its filename was
too long. Wait, what ? As soon as you start using
npm and download a bit of
modules, you'll most certainly end up with a
node_modules folder that's too
long for Windows to handle.
npm is clever, and it can circumvent this limitation. So, whenever you
want to delete a
node_modules folder and Windows won't let you do it, use
npm. Update your
package.json to remove every element in
devDependencies and run
npm prune. This will empty your
Want to add something ? Feel free to get in touch on Twitter : @pixelastic