René's URL Explorer Experiment


Title: server-runtime-injection: ESM hook's vendored imports and @sentry/core ESM build are not traced on Next.js/Vercel, so registration fails on every cold start · Issue #26121 · getsentry/sentry-javascript · GitHub

Open Graph Title: server-runtime-injection: ESM hook's vendored imports and @sentry/core ESM build are not traced on Next.js/Vercel, so registration fails on every cold start · Issue #26121 · getsentry/sentry-javascript

X Title: server-runtime-injection: ESM hook's vendored imports and @sentry/core ESM build are not traced on Next.js/Vercel, so registration fails on every cold start · Issue #26121 · getsentry/sentry-javascript

Description: Environment @sentry/nextjs 11.10.0 (with @sentry/node, @sentry/server-runtime-injection and @sentry/core 11.10.0) Next.js 16.4.3, App Router, next build with Turbopack (the default) pnpm 9.15.0 (isolated node_modules/.pnpm store) Vercel,...

Open Graph Description: Environment @sentry/nextjs 11.10.0 (with @sentry/node, @sentry/server-runtime-injection and @sentry/core 11.10.0) Next.js 16.4.3, App Router, next build with Turbopack (the default) pnpm 9.15.0 (is...

X Description: Environment @sentry/nextjs 11.10.0 (with @sentry/node, @sentry/server-runtime-injection and @sentry/core 11.10.0) Next.js 16.4.3, App Router, next build with Turbopack (the default) pnpm 9.15.0 (is...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/26121

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"server-runtime-injection: ESM hook's vendored imports and @sentry/core ESM build are not traced on Next.js/Vercel, so registration fails on every cold start","articleBody":"### Environment\n\n- `@sentry/nextjs` 11.10.0 (with `@sentry/node`, `@sentry/server-runtime-injection` and `@sentry/core` 11.10.0)\n- Next.js 16.4.3, App Router, `next build` with Turbopack (the default)\n- pnpm 9.15.0 (isolated `node_modules/.pnpm` store)\n- Vercel, Node.js 22 functions (`nodejs22.x`)\n- `Sentry.init` in `sentry.server.config.ts` with default options, `tracesSampleRate: 0`\n\n### What happens\n\nEvery cold start of a Node function logs:\n\n```\n[Sentry] Failed to register diagnostics-channel injection hooks (Cannot find module '/var/task/node_modules/.pnpm/@sentry+server-runtime-injection@11.10.0/node_modules/@sentry/server-runtime-injection/build/esm/vendored/@apm-js-collab/tracing-hooks/hook.js' imported from /var/task/node_modules/.pnpm/@sentry+server-runtime-injection@11.10.0/node_modules/@sentry/server-runtime-injection/build/esm/hook.js), so channel-based integrations will not record spans.\n```\n\n#23687 made `build/esm/hook.js` itself traceable, and #25480 added `build/esm/package.json`. Both fixes are in 11.10.0, and `hook.js` does reach the function. But `hook.js` imports from `build/esm/vendored/**`, which Next's file trace does not follow. My guess is that this is because `register.js` hands the hook to `Module.register()` by runtime path.\n\n### What we tried\n\nWe added the package's ESM build to every route's trace:\n\n```js\noutputFileTracingIncludes: {\n  \"/**\": [\"./node_modules/.pnpm/@sentry+server-runtime-injection@*/node_modules/@sentry/server-runtime-injection/build/esm/**/*.{js,json}\"],\n}\n```\n\nAfter deploying, some functions still logged the missing vendored `hook.js`. Others got past it and failed on the next missing file:\n\n```\n[Sentry] Failed to register diagnostics-channel injection hooks (Cannot find module '/var/task/node_modules/.pnpm/@sentry+server-runtime-injection@11.10.0/node_modules/@sentry/core/build/esm/index.js' imported from /var/task/node_modules/.pnpm/@sentry+server-runtime-injection@11.10.0/node_modules/@sentry/server-runtime-injection/build/esm/debug.js\nDid you mean to import \"@sentry/core/build/cjs/index.js\"?)\n```\n\nThe rest of the app loads `@sentry/core` as CJS, so its ESM build is never traced. The ESM loader hook graph (the vendored tree, `debug.js`, and `@sentry/core`'s ESM build) needs to be either self-contained in the package or reachable by the tracer.\n\n### Expected\n\nWith default options on Next.js + Vercel, either the hook registers, or the SDK skips it quietly when its files are absent, instead of warning on every cold start.\n\n### Workaround\n\n`enableRuntimeChannelInjection: false` in the server `Sentry.init`. That's fine for us because tracing is off, but it silently turns off channel-based spans for anyone who has tracing on.\n","author":{"url":"https://github.com/charlesrhoward","@type":"Person","name":"charlesrhoward"},"datePublished":"2026-11-05T04:28:56Z","url":"https://github.com/getsentry/sentry-javascript/issues/26121"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c24ee84f-b9ac-9707-f008-81ae06369916
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD02C:1D4BD6:45DF52:61FA7F:6B0441F9
html-safe-nonce3e0ab98f1d08696d03e6ba0ba3108de546201e791840d3271a24e5a43791a494
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDJDOjFENEJENjo0NURGNTI6NjFGQTdGOjZCMDQ0MUY5IiwidmlzaXRvcl9pZCI6IjkzNzkxMTY2ODI4ODI3NDkzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf95c9cb88a2a05189f372e4dfdd2cd6970894e260a4e0198143ba412959fedaa
hovercard-subject-tagissue:6216781196
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/26121/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1ad838bd9910c8a3466a6dc404160f33bebc90c20be1c3bbaa58bb0e8b5fdf31/getsentry/sentry-javascript/issues/26121
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1ad838bd9910c8a3466a6dc404160f33bebc90c20be1c3bbaa58bb0e8b5fdf31/getsentry/sentry-javascript/issues/26121
og:image:altEnvironment @sentry/nextjs 11.10.0 (with @sentry/node, @sentry/server-runtime-injection and @sentry/core 11.10.0) Next.js 16.4.3, App Router, next build with Turbopack (the default) pnpm 9.15.0 (is...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecharlesrhoward
hostnamegithub.com
expected-hostnamegithub.com
None9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release06dc448a76fe4751ac1db26524aefa3aa3e889a8
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/26121#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F26121
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F26121
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/26121
Reloadhttps://github.com/getsentry/sentry-javascript/issues/26121
Reloadhttps://github.com/getsentry/sentry-javascript/issues/26121
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues339 (339)https://github.com/getsentry/sentry-javascript/issues
Pull requests53 (53)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/26121
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/26121
#26278https://github.com/getsentry/sentry-javascript/pull/26278
server-runtime-injection: ESM hook's vendored imports and @sentry/core ESM build are not traced on Next.js/Vercel, so registration fails on every cold starthttps://github.com/getsentry/sentry-javascript/issues/26121#top
#26278https://github.com/getsentry/sentry-javascript/pull/26278
https://github.com/mydea
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Next.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Next.js%22
Node.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Node.js%22
https://github.com/charlesrhoward
charlesrhowardhttps://github.com/charlesrhoward
on Nov 5, 2026https://github.com/getsentry/sentry-javascript/issues/26121#issue-6216781196
#23687https://github.com/getsentry/sentry-javascript/pull/23687
#25480https://github.com/getsentry/sentry-javascript/issues/25480
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Nov 5, 2026https://github.com/getsentry/sentry-javascript/issues/26121#issuecomment-6649695933
Linear Codehttps://linear.app
JS-4067https://linear.app/getsentry/issue/JS-4067
linear-codehttps://github.com/apps/linear-code
Next.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Next.js%22
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Node.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Node.js%22
on Nov 5, 2026https://github.com/getsentry/sentry-javascript/issues/26121#event-35204254292
sentry-juniorhttps://github.com/apps/sentry-junior
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Nov 5, 2026https://github.com/getsentry/sentry-javascript/issues/26121#event-35217568553
chargomehttps://github.com/chargome
on Nov 5, 2026https://github.com/getsentry/sentry-javascript/issues/26121#event-35218172989
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Nov 5, 2026https://github.com/getsentry/sentry-javascript/issues/26121#event-35221665864
https://github.com/chargome
chargomehttps://github.com/chargome
on Nov 5, 2026https://github.com/getsentry/sentry-javascript/issues/26121#issuecomment-6661046988
sentry-juniorhttps://github.com/apps/sentry-junior
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Nov 5, 2026https://github.com/getsentry/sentry-javascript/issues/26121#event-35253274178
mydeahttps://github.com/mydea
mydeahttps://github.com/mydea
chargomehttps://github.com/chargome
on Nov 11, 2026https://github.com/getsentry/sentry-javascript/issues/26121#event-35776822639
timfishhttps://github.com/timfish
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#26278https://github.com/getsentry/sentry-javascript/pull/26278
on Nov 12, 2026https://github.com/getsentry/sentry-javascript/issues/26121#event-35918553770
mydeahttps://github.com/mydea
on Nov 13, 2026https://github.com/getsentry/sentry-javascript/issues/26121#event-36004482257
fix(server-runtime-injection): Say when hook registration fails becau…https://github.com/getsentry/sentry-javascript/commit/25b3a98dbea1f88f11b9adc867e1854e732229e6
25b3a98https://github.com/getsentry/sentry-javascript/commit/25b3a98dbea1f88f11b9adc867e1854e732229e6
ref(server-runtime-injection): Say when hook registration fails becau…https://github.com/getsentry/sentry-javascript/commit/60f2958b052194bf82fe863c374345dda35c055a
60f2958https://github.com/getsentry/sentry-javascript/commit/60f2958b052194bf82fe863c374345dda35c055a
ref(server-runtime-injection): Say when hook registration fails becau…https://github.com/getsentry/sentry-javascript/commit/5ec2b5edc5c11295c81c586859fed6007c1d95ec
5ec2b5ehttps://github.com/getsentry/sentry-javascript/commit/5ec2b5edc5c11295c81c586859fed6007c1d95ec
RulaKhaledhttps://github.com/RulaKhaled
on Nov 16, 2026https://github.com/getsentry/sentry-javascript/issues/26121#event-36286809631
fix(server-runtime-injection): Register the CJS loader hook from the …https://github.com/pcbeingused333/sentry-javascript/commit/f49009b49e56b38f90c650da42d8a48bfcd138b8
https://docs.github.com/articles/closing-issues-via-commit-messages
f49009bhttps://github.com/pcbeingused333/sentry-javascript/commit/f49009b49e56b38f90c650da42d8a48bfcd138b8
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Nov 16, 2026https://github.com/getsentry/sentry-javascript/issues/26121#issuecomment-6922350567
GitHub Actionshttps://help.github.com/en/actions
#26278https://github.com/getsentry/sentry-javascript/pull/26278
11.13.0 releasehttps://github.com/getsentry/sentry-javascript/releases/tag/11.13.0
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/26121
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/26121
mydeahttps://github.com/mydea
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Next.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Next.js%22
Node.jshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Node.js%22
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.