Home > Enterprise >  Module not found: Can't resolve 'async_hooks'
Module not found: Can't resolve 'async_hooks'

Time:03-17

Failed to compile.

./node_modules/vm2/lib/resolver-compat.js
Module not found: Can't resolve 'async_hooks' in \node_modules\vm2\lib'
Error from chokidar (E:\node_modules): Error: EBUSY: resource busy or locked, lstat 'E:\pagefile.sys'
Error from chokidar (E:\node_modules): Error: EBUSY: resource busy or locked, lstat 'E:\pagefile.sys'

When I try to run my app(react), suddently this errors showed up, and even reinstalling the node modules won't work, I tried to reinstall node and webpack too and neither worked.

CodePudding user response:

Needed to ask you if you have downloaded the project or you made it thoroughly? in case you have downloaded (due to the existence of the package.json) at the project directory you can simply:

npm i

That command will install all the packages expressed in the package.json file with the same version.

if this command hasn't helped you, you can do another thing:

Update the NPM globally using this command:

    npm install -g npm@latest

Install another version of "async_hooks". Unfortunately, there is only one version of the package.

  • Related