Error: Unable to resolve module `async_hooks`
See original GitHub issueHello
I am attempting to run @airbrake/node
in my react-native project. The versions I am running are:
- React-Native: 0.61.2
- @airbrake/node: 1.0.2
When I run my mobile app with this install and using the notifier, I get the error:
Error: Unable to resolve module async_hooks from node_modules/@airbrake/node/dist/airbrake.common.js
Do I need to install async_hooks? It’s not present in any of the package.json files in either browser, node or airbrake-js in general.
Happy to do a PR if that is the case
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Module not found: Can't resolve 'async_hooks' - Stack Overflow
The problem with 'async_hooks' is that it will only be available in node on serverside - if e.g. webpack tries to create a...
Read more >Nodejs APM - Can't resolve 'async_hooks' - Elastic Discuss
We are trying to use APM for our React nodejs app. We have added the dependency in our package.json to install the elastic-apm-node...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >Async hooks | Node.js v19.3.0 Documentation
Error handling; Printing in AsyncHook callbacks. Class: AsyncHook ... The node:async_hooks module provides an API to track asynchronous resources.
Read more >[Solved]-Module not found: Can't resolve 'async_hooks'-Reactjs
Related Query · How to fix this error : " Module not found :can't resolve popper. · "module not found : Error: Cannot...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
async_hooks is a Node.js core module - it should be available automatically.
Why don’t you use @airbrake/browser with React native? I am not familiar with React native so I can miss something obvious…
Update, this wasn’t anything to do with Airbrake sorry, my jest was running as well and I was getting this error from tests.
The fix was to add to my jest config in my
package.json
: