The Problem

When installing on Node.js (Windows) via the following NPM command:

npm install

You may receive the following error:

Error: ENOENT, stat 'C:\Users\...\AppData\Roaming\npm'

Mmmm, ambiguous error messages. :trollface:

The Solution

Apparently this is a bug in the currently current version of Node.js (v0.10.32) and/or NPM (v1.4.28). The solution is straightforward and just requires creating the above noted “npm” folder within AppData. I’m sure you can figure this out, but copy-pasting is much more fun:

mkdir %APPDATA%\npm

That’s it. You should now be able to execute the NPM command to install without any errors. Note you will probably need to run this command with administrative privileges. I didn’t need to run my command line as an Administrator, but I’ve read that you may have to (yes, you, specifically; the Google referred to you by name.)

Share This Article

I am available for remote contract work

If you have a project that needs help, a process that needs improvement, or an idea that you want a sounding board for, I would love to have a discussion with you.

Learn More →

Looking for an amazing full-time developer, architect, or consultant?

I'm currently employed as a Senior Consultant at Magenic and not actively seeking another position at this time, but I would love to know what you're working on and how I can help. I may even know someone who might be a fit for you.

Let's Connect

Want advice, thoughts, or feedback? Tell me what you're working on or describe a challenge you're facing and I'll do my best to help.

Free Downloadable Book: 10 Killer Tips for .NET Web API

Be awesome. Get my free 56-page downloadable book about building performant, scalable, maintainable software using .NET Web API. (There's also a bonus chapter on effectively using HTTP Status Codes.)

Enter your email address below and get it immediately.