Closed michael42 closed 2 years ago
While debugging the issue, we noticed that Instana tries to read the deprecated process.mainModule
, which apparently is not set for ECMAScript entry points.
As a workaround, we're now setting process.mainModule
ourselves (based in import.meta.url
).
Hey 🤙 Sorry for the late response and thanks for debugging. We will take care, reproduce and ship a fix asap 👍
We have released 2.6.2, which contains a fix.
Problem Description
We're currently switching a microservice to ECMAScript Modules and noticed, that Instana can't find the main
package.json
anymore.It logs:
Short, Self Contained Example
register-instana.cjs
:index.js
:Then run
node --require register-instana.cjs index.js
.Node.js Version
v16.16.0
package.json
package-lock.json