EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'

Viewed 1158

I am trying to publish an npm package but I keep getting this error.

Any idea how I can fix it. please help me.

thanks in advance.

error

EBUSY
 all lstat
 C:\hiberfil.sys
 -4082
  EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
3 Answers

I had similar issues, try this:

  1. Remove node_modules directory, package-lock.json file.
  2. Run npm install
  3. Run npm cache clean --force

I tried deleting node modules but it didn't work. The issue in my case was because of a wrongly imported dependency by VSCode, I fixed the issue by removing the last imports I added to my code.

in my project, the reason is I imported the wrong module like this "import {umd} from 'vue'" ,check out your

Related