Search code examples
javascriptnode.jsnpmnpm-publish

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


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'

Solution

  • 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