Title: fsIntegration crashes in native ESM when patching the read-only fs namespace · Issue #25950 · getsentry/sentry-javascript · GitHub
Open Graph Title: fsIntegration crashes in native ESM when patching the read-only fs namespace · Issue #25950 · getsentry/sentry-javascript
X Title: fsIntegration crashes in native ESM when patching the read-only fs namespace · Issue #25950 · getsentry/sentry-javascript
Description: Environment @sentry/node 11.10.0 Node.js 24.22.1, Linux x64 Native ESM, no bundler Minimal reproduction import { fsIntegration } from '@sentry/node'; fsIntegration().setupOnce?.(); Run with node --input-type=module (or save as .mjs). The...
Open Graph Description: Environment @sentry/node 11.10.0 Node.js 24.22.1, Linux x64 Native ESM, no bundler Minimal reproduction import { fsIntegration } from '@sentry/node'; fsIntegration().setupOnce?.(); Run with node --...
X Description: Environment @sentry/node 11.10.0 Node.js 24.22.1, Linux x64 Native ESM, no bundler Minimal reproduction import { fsIntegration } from '@sentry/node'; fsIntegration().setupOnce?.(); Run with...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/25950
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fsIntegration crashes in native ESM when patching the read-only fs namespace","articleBody":"### Environment\n- `@sentry/node` 11.10.0\n- Node.js 24.22.1, Linux x64\n- Native ESM, no bundler\n\n### Minimal reproduction\n```js\nimport { fsIntegration } from '@sentry/node';\nfsIntegration().setupOnce?.();\n```\nRun with `node --input-type=module` (or save as `.mjs`). The same failure occurs when registering `fsIntegration()` through `Sentry.init()`.\n\n### Actual behavior\nThe process throws asynchronously:\n```text\nTypeError: Cannot assign to read only property 'accessSync' of object '[object Module]'\n```\nThe stack points to `_patchMethod` in `build/esm/integrations/fs/vendored/instrumentation.js`.\n\n### Expected behavior\nFilesystem instrumentation initializes in native ESM without crashing.\n\n### Cause and workaround\nThe ESM implementation imports `* as fs from 'fs'` and then assigns wrappers to that read-only module namespace. Loading the integration from the public CommonJS build with `createRequire()` works. Using the mutable default `fs` export fixes the crash; calling `syncBuiltinESMExports()` afterward also refreshes named ESM bindings.\n\n","author":{"url":"https://github.com/utrumo","@type":"Person","name":"utrumo"},"datePublished":"2026-10-30T14:10:40Z","url":"https://github.com/getsentry/sentry-javascript/issues/25950"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8fac867e-ade3-3c27-7792-3bd2f59bae71 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 93FC:237D74:1FE902:2AF7C9:6B043171 |
| html-safe-nonce | 54b547dcb7db89824c42150e45406ec5cc2286a3aa1e01f7f58306dd5e8ce125 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0ZDOjIzN0Q3NDoxRkU5MDI6MkFGN0M5OjZCMDQzMTcxIiwidmlzaXRvcl9pZCI6Ijg4Mjc5OTM1NzE0NzE5Mjk3MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8c6eaf19cc247f9e7ad05677cb36988602f6ba7e12cc178fdee5435d5a661b0f |
| hovercard-subject-tag | issue:6120693615 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/25950/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2fd8f3f900f54ceb7326623a3b3b1518ca02db23454a0e444aa4428036e29459/getsentry/sentry-javascript/issues/25950 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2fd8f3f900f54ceb7326623a3b3b1518ca02db23454a0e444aa4428036e29459/getsentry/sentry-javascript/issues/25950 |
| og:image:alt | Environment @sentry/node 11.10.0 Node.js 24.22.1, Linux x64 Native ESM, no bundler Minimal reproduction import { fsIntegration } from '@sentry/node'; fsIntegration().setupOnce?.(); Run with node --... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | utrumo |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width