appmetrics-elk icon indicating copy to clipboard operation
appmetrics-elk copied to clipboard

Appmetrics Module Initialization error while running the lambda node Js function in console

Open diviniya opened this issue 7 years ago • 1 comments

Added the following lines in the index.js file, var config = { host: 'http://localhost:9200' } var appmetrics = require('appmetrics-elk').monitor(config);

When trying to test the lambda function it says module initialization error, please find the stack trace for the error

{ "errorMessage": "/var/task/node_modules/appmetrics-elk/node_modules/appmetrics/appmetrics.node: invalid ELF header", "errorType": "Error", "stackTrace": [ "Object.Module._extensions..node (module.js:434:18)", "Module.load (module.js:343:32)", "Function.Module._load (module.js:300:12)", "Module.require (module.js:353:17)", "require (internal/module.js:12:17)", "Object. (/var/task/node_modules/appmetrics-elk/node_modules/appmetrics/index.js:27:13)", "Module._compile (module.js:409:26)", "Object.Module._extensions..js (module.js:416:10)", "Module.load (module.js:343:32)" ] }

Any help is appreciated. Thanks.

diviniya avatar Mar 03 '17 21:03 diviniya

Looks like a problem either loading the native addon for appmetrics or earlier at the install or compile stage. Did npm install succeed? Can you post the output? What platform are you running on, what version of appmetrics?

sjanuary avatar May 02 '17 12:05 sjanuary