AWS Lambda with Webpack throws error

Myths
Mon, 06 Nov 2023 22:08:12 +0000
APM

I am trying to use the aws lambda layer to communicate with APM

elastic.co

Monitoring AWS Lambda Node.js Functions | APM Node.js Agent Reference [4.x] |...

We use webpack for bundling , I am getting below error. I have tried including the elastic-apm-node in package.json with no luck .

Just wondering if there is a way to get this working ? Or it is not supported ?

	2023-11-06T21:39:03.556+00:00
Error: Cannot find module 'elastic-apm-node/start'

	Error: Cannot find module 'elastic-apm-node/start'
	2023-11-06T21:39:03.556+00:00	Require stack:
	2023-11-06T21:39:03.556+00:00	- internal/preload
	2023-11-06T21:39:03.556+00:00	at Function.Module._resolveFilename (internal/modules/cjs/loader.js:931:15)
	2023-11-06T21:39:03.556+00:00	at Function.Module._load (internal/modules/cjs/loader.js:774:27)
	2023-11-06T21:39:03.556+00:00	at internalRequire (internal/modules/cjs/loader.js:161:19)
	2023-11-06T21:39:03.556+00:00	at Module._preloadModules (internal/modules/cjs/loader.js:1273:5)
	2023-11-06T21:39:03.556+00:00	at loadPreloadModules (internal/bootstrap/pre_execution.js:475:5)
	2023-11-06T21:39:03.556+00:00	at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:72:3)
	2023-11-06T21:39:03.556+00:00	at internal/main/run_main_module.js:7:1 {
	2023-11-06T21:39:03.556+00:00	code: 'MODULE_NOT_FOUND',
	2023-11-06T21:39:03.556+00:00	requireStack: [ 'internal/preload' ]
	2023-11-06T21:39:03.556+00:00	}

6 posts - 3 participants