Skip to content

docs(js): Restructure the Node install methods for v11 - #19368

Draft
JPeer264 wants to merge 1 commit into
masterfrom
janpeer/sdk-1494-node-getting-started-manual-setup
Draft

docs(js): Restructure the Node install methods for v11#19368
JPeer264 wants to merge 1 commit into
masterfrom
janpeer/sdk-1494-node-getting-started-manual-setup

Conversation

@JPeer264

@JPeer264 JPeer264 commented Sep 11, 2026

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

closes SDK-1494

(kept the version v18 ranges as they ill be removed here: #19317)

Bring the Node install pages in line with the v11 install methods, and fix the ESM snippets that stop the app from starting.

  • Fix the extensionless import "./instrument" in the Express, Fastify, Hapi and Connect ESM tabs, in install/esm-without-import.mdx and in the NestJS ESM page. The config step creates instrument.mjs, and Node ESM does not probe extensions, so the app stopped with ERR_MODULE_NOT_FOUND.
  • Start the Koa ESM tab with --import instead. With the extension fixed the app starts, but koa is already loaded when Sentry.init runs, so every router and middleware span and every route name is lost.
  • Rewrite install/late-initialization.mdx around node --import @sentry/node/import. The page told readers to use @sentry/node/preload, which is no longer exported and fails with ERR_PACKAGE_PATH_NOT_EXPORTED. Drop SENTRY_PRELOAD_INTEGRATIONS with it, and show a CommonJS entry point next to the ESM one, since --import covers both.
  • Rework install/index.mdx around the three v11 methods: --import your instrument file, a bundler plugin with a top-level import, and --import the SDK with a later Sentry.init(). Say that --import covers CommonJS as well, and that --require is gone.
  • Rewrite install/esm-without-import.mdx around the bundler plugin and the deferred entry point, and say why a top-level import alone is not equivalent to --import.
  • Remove the registerEsmLoaderHooks troubleshooting from install/esm.mdx. The option was removed and the SDK no longer depends on import-in-the-middle.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace YYYY-MM-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've supplied a deadline.

Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

@JPeer264
JPeer264 requested review from isaacs and msonnb September 11, 2026 12:48
@JPeer264 JPeer264 self-assigned this Sep 11, 2026
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Sep 11, 2026 2:48pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Sep 11, 2026 2:48pm UTC

Request Review

@linear-code

linear-code Bot commented Sep 11, 2026

Copy link
Copy Markdown

SDK-1494

@github-actions github-actions Bot added the Priority: Needs Triage The PR description is missing valid priority information label Sep 11, 2026
Bring the Node install pages in line with the v11 install methods, and fix
the snippets that stop the app from starting.

- Fix the extensionless `import "./instrument"` in the Express, Fastify,
  Hapi and Connect ESM tabs, in `install/esm-without-import.mdx` and in
  the NestJS ESM page. The config step creates `instrument.mjs`, and Node
  ESM does not probe extensions, so the app stopped with
  `ERR_MODULE_NOT_FOUND`.
- Start the Koa ESM tab with `--import` instead. With the extension fixed
  the app starts, but `koa` is already loaded when `Sentry.init` runs, so
  every router and middleware span and every route name is lost.
- Rewrite `install/late-initialization.mdx` around
  `node --import @sentry/node/import`. The page told readers to use
  `@sentry/node/preload`, which is no longer exported and fails with
  `ERR_PACKAGE_PATH_NOT_EXPORTED`. Drop `SENTRY_PRELOAD_INTEGRATIONS`
  with it, and show a CommonJS entry point next to the ESM one, since
  `--import` covers both.
- Rework `install/index.mdx` around the three v11 methods: `--import` your
  instrument file, a bundler plugin with a top-level import, and
  `--import` the SDK with a later `Sentry.init()`. Say that `--import`
  covers CommonJS as well, and that `--require` is gone.
- Rewrite `install/esm-without-import.mdx` around the bundler plugin and
  the deferred entry point, and say why a top-level import alone is not
  equivalent to `--import`.
- Remove the `registerEsmLoaderHooks` troubleshooting from
  `install/esm.mdx`. The option was removed and the SDK no longer depends
  on `import-in-the-middle`.
- Drop the `@sentry/node-core` lightweight mode entry. The package was
  merged back into `@sentry/node`.
- Run the CommonJS example with `--import` in `getting-started-run`.
  `--require` is no longer supported for initialization.

Refs SDK-1494
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

js-v11-docs Priority: Needs Triage The PR description is missing valid priority information

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant