Wednesday, July 9, 2014

npm install ENOENT errors

I've been working on a project that is built using NodeJS. Our development environment is a bit of a hybrid. Most of the developers are developing on Macs, with one exception. Our build server is on Windows and our site is running in Windows Azure. For the most part developing NodeJS on a Mac is quite straightforward. All the tooling is readily available and tends to work quite well. Not so much on Windows. So when our build server starting to run into issues installing the requestify package, we chalked it up to something not liking Windows.

We were getting ENOENT errors where npm was complaining that it couldn't find files that it was supposed to download on the file system. Since the error was happening installing a dependency of a dependency, we thought maybe it was a long paths issue. However, we couldn't even get it to install running in the root directory. We decided to use a work around to switch to a different version of that particular dependency.

Weeks later I ran into the same issue, but this time on my Mac. I found a solution by running npm cache clean before running npm install again. I tried it on the Windows build server and it started working again.

If you're seeing ENOENT errors when running npm install try running npm cache clean and try again.


  1. Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me.

    Best Cartoon Portrait Maker
    Caller id apps download
    Free Offline Fighting Games
    Free Call Recorder Apps

  2. this is great! OMG, here how I did it. you can go to this, then click where ever you want. LoL!

    Best Android Launchers 2019

    kirin 659 vs snapdragon 636

    POCO F2 Launch date

  3. Hello, This is very Helpful Content. this article really getting me an aspiration to do the same as you
    Mobile App Development Company in Dubai

  4. Thanks for sharing information with all of us . Who visit your website . good work and great stuff .
    website designer in Noida Ghaziabad