question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Async-hooks error in Node 10.15.2

See original GitHub issue
Failed to compile
./node_modules/elastic-apm-node/lib/instrumentation/async-hooks.js
Module not found: Can't resolve 'async_hooks' in '/Users/alogishe/workspace/PCF/on-borading-ui/node_modules/elastic-apm-node/lib/instrumentation'

I have also tried to add asyncHooks value to False but it still failed

var agent = require("elastic-apm-node").start({
	// Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)
	serviceName: "app_name",
	// Set custom APM Server URL (default: http://localhost:8200)
	serverUrl: "http://0.0.0.0:8200",
	asyncHooks: false
});

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
kjk515commented, Oct 7, 2019

Can you let me know how to set the webpack ‘node’ option?

2reactions
Qardcommented, May 21, 2019

Are you trying to use it with webpack? That looks like the error you get when trying to bundle Node.js code that uses non-browser-compatible code without explicitly telling webpack to allow it. See: https://webpack.js.org/configuration/node#other-node-core-libraries

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does my use of the async hooks API cause an abnormal ...
This code has been tested on Windows 10 with Node.js versions 8.9.4, 10.15.2 and 12.6.0. This code has now been tested on MacOS...
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 >
Update Node.js solution stack versions in Elastic Beanstalk
I receive an error when I try a manual or managed update to a newer version of a Node.js solution stack in AWS...
Read more >
node - npm
Start using node in your project by running `npm i node`. There are 547 other projects in the npm registry using node. ......
Read more >
Using Async Hooks for Request Context Handling in Node.js
error (err); } console.log(`server is listening on ${port}`); });. In this piece of code, we require express ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found