-
Notifications
You must be signed in to change notification settings - Fork 39
fix: removed support for experimental loader flag #2153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v5-release
Are you sure you want to change the base?
Changes from 3 commits
f9f068c
70826e1
bd4d8ff
4bdd095
ad59a6a
12d3113
40240f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,36 @@ if (isNodeJsTooOld()) { | |
| return; | ||
| } | ||
|
|
||
| const { esm: esmUtil } = require('@instana/core/src/util'); | ||
aryamohanan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| // Check for unsupported ESM loader configurations and exit early | ||
| if (esmUtil.hasExperimentalLoaderFlag()) { | ||
| // eslint-disable-next-line no-console | ||
| console.error( | ||
| 'Node.js introduced breaking changes in versions 18.19.0 and above, leading to the discontinuation of support ' + | ||
|
||
| `for the --experimental-loader flag by Instana. The current Node.js version is ${process.version} and ` + | ||
| 'this process will not be monitored by Instana. ' + | ||
| "To ensure tracing by Instana, please use the '--import' flag instead. For more information, " + | ||
| 'refer to the Instana documentation: ' + | ||
| 'https://www.ibm.com/docs/en/instana-observability/current?topic=nodejs-collector-installation.' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we link to the upcoming v4->v5 migration guide? |
||
| ); | ||
| return; | ||
| } | ||
|
|
||
| // This loader worked with '--experimental-loader' in Node.js versions below 18.19. | ||
| // TODO: Remove 'esm-loader.mjs' file and this log in the next major release (v6). | ||
| if (esmUtil.hasEsmLoaderFile()) { | ||
|
||
| // eslint-disable-next-line no-console | ||
| console.error( | ||
| "Detected use of 'esm-loader.mjs'. This file is no longer supported and will be removed in next major release. " + | ||
| 'This process will not be monitored by Instana. ' + | ||
| "To ensure tracing by Instana, please use the 'esm-register.mjs' file instead. For more information, " + | ||
| 'refer to the Instana documentation: ' + | ||
| 'https://www.ibm.com/docs/en/instana-observability/current?topic=nodejs-collector-installation.' | ||
| ); | ||
| return; | ||
| } | ||
|
|
||
| const { util: coreUtil } = require('@instana/core'); | ||
| const { environment: environmentUtil, consoleLogger: serverlessLogger } = require('@instana/serverless'); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.