npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

EBUSY: resource busy or locked: “update-notifier-npm.json”

What I Wanted to Do

Use any NPM command, e.g. npm -v

What Happened Instead

Intermitten errors:

npm ERR! path D:\Users\[user]\.config\configstore\update-notifier-npm.json
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall open
npm ERR! EBUSY: resource busy or locked, open 'D:\Users\[user]\.config\configstore\update-notifier-npm.json'

Reproduction Steps

I cannot reproduce on my personal machine, but I’ve seen 3 work machines with this issue. I just installed NodeJS and NPM 6.4.1 on a new machine at work and have the issue.

Seems to happen on ALL npm commands, even npm -v, randomly. Sometimes they work, sometimes they fail with the error.


Might be related to this message, which also appears at random - not at the same time as the error though:

│                    npm update check failed                     │
│              Try running with sudo or get access               │
│              to the local update config store via              │
│ sudo chown -R $USER:$(id -gn $USER) D:\Users\[user]\.config │

Platform Info

$ npm --versions
NPM 6.4.1 
$ node -p process.platform