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

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.