3

After upgrading to Nuxt version 2.12.2, I am seeing this every few minutes. The interval seems random, but it happens constantly. The only thing to be done is to restart the server.

events.js:287
      throw er; // Unhandled 'error' event
      ^

Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Emitted 'error' event on FSWatcher instance at:
    at FSWatcher._handleError (C:\Users\mad\git\balloonary-app\node_modules\@nuxt\builder\node_modules\chokidar\index.js:631:10)
    at ReaddirpStream.NodeFsHandler._boundHandleError (C:\Users\mad\git\balloonary-app\node_modules\@nuxt\builder\node_modules\chokidar\lib\nodefs-handler.js:302:43)
    at ReaddirpStream.emit (events.js:310:20)
    at ReaddirpStream.EventEmitter.emit (domain.js:482:12)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -4082,
  code: 'EBUSY',
  syscall: 'lstat',
  path: 'C:\\hiberfil.sys'
}
[nodemon] app crashed - waiting for file changes before starting...

EDIT:

I tried disabling hibernation, like this:

powercfg -h off

and sure enough, no more hiberhil.sys! So now it crashes with exactly the same message, but referring to pagefile.sys instead :(

Tried running npm run dev as admin, but sadly the issue persists.

I should mention that this issue began when I started using npm run dev rather than nuxt dev to launch the app, but I can't find this "nuxt" CLI tool anywhere now (even though it is referenced everywhere in the docs here https://nuxtjs.org/guide/commands ... I can find no hint as how or where to obtain this tool.)

Marc
  • 1,812
  • 4
  • 23
  • 36
  • are you running on linux? If you are, it may be that nodemon does not have write capability so you have to add `sudo` behind your command... – bloo May 31 '20 at 09:36
  • @AshwynHorton: Take a closer look, he is not running on linux :) – eol May 31 '20 at 09:54
  • 1
    Then try running the command as admin if you're using windows...see this https://stackoverflow.com/questions/10747347/node-js-and-file-system-on-windows-ebusy-error#answer-10750786 – bloo May 31 '20 at 10:03
  • nope! tried running as admin. after a couple minutes, same issue. – Marc May 31 '20 at 10:18

1 Answers1

0

I disabled hibernation with:

powercfg -h off

while resulted in the same error, but now with pagefile.sys. So... I disabled virtual memory, too, thusly:

https://www.trishtech.com/2014/11/disable-virtual-memory-in-windows-10/

Now my app seems to be stable.

I find it surprising and bizarre that Nodejs should have any interest in either of these quite low-level system files. Also, where is this mysterious "nuxt" command line utility? Anyone???

Marc
  • 1,812
  • 4
  • 23
  • 36