8000 TypeError: setters.get(...)[name] is not a function · Issue #16327 · getsentry/sentry-javascript · GitHub
[go: up one dir, main page]

Skip to content

TypeError: setters.get(...)[name] is not a function #16327

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

Open
3 tasks done
gijsroge opened this issue May 19, 2025 · 4 comments
Open
3 tasks done

TypeError: setters.get(...)[name] is not a function #16327

gijsroge opened this issue May 19, 2025 · 4 comments

Comments

@gijsroge
Copy link
gijsroge commented May 19, 2025

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react-router

SDK Version

19.9.0

Framework Version

React 19

Link to Sentry event

No response

Reproduction Example/SDK Setup

https://github.com/gijsroge/sentry-19.9-issue

Steps to Reproduce

npm run dev

Expected Result

Actual Result

When running npm run dev

I get the following error:

failed to load config from /frontend/apps/website/vite.config.ts
TypeError: setters.get(...)[name] is not a function
    at Object.set (/frontend/node_modules/.pnpm/import-in-the-middle@1.13.2/node_modules/import-in-the-middle/lib/register.js:13:37)
    at callHookFn (/frontend/node_modules/.pnpm/import-in-the-middle@1.13.2/node_modules/import-in-the-middle/index.js:31:23)
    at Hook._iitmHook (/frontend/node_modules/.pnpm/import-in-the-middle@1.13.2/node_modules/import-in-the-middle/index.js:150:11)
    at /frontend/node_modules/.pnpm/import-in-the-middle@1.13.2/node_modules/import-in-the-middle/lib/register.js:42:31
    at Array.forEach (<anonymous>)
    at register (/frontend/node_modules/.pnpm/import-in-the-middle@1.13.2/node_modules/import-in-the-middle/lib/register.js:42:15)
    at file:///frontend/node_modules/.pnpm/react-router@7.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-router/dist/development/index.mjs?iitm=true:1635:1
    at ModuleJobSync.runSync (node:internal/modules/esm/module_job:396:35)
    at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:366:47)
    at loadESMFromCJS (node:internal/modules/cjs/loader:1554:24)

Good to know is that this did not happen on 19.8.0 so the issue has been re-introduced in 19.9.0. I say re-introduced because it was reported on < 19.15.0 versions as well #16137

Possibly related: nodejs/import-in-the-middle#188

@chargome
Copy link
Member

Hey @gijsroge thanks for reporting this!

Just tried your repro locally on my machine but could not reproduce it – neither with npm nor with pnpm. Could you try nuking your node_modules folder and re-install your deps?

@gijsroge
Copy link
Author

Thats so weird, just nuked node_modules and tried again and I do get the error. Im running node 23.7.0

Image

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 May 19, 2025
Copy link
Member

Could reproduce it now 👍

@timfish
Copy link
Collaborator
timfish commented May 19, 2025

This error is because NODE_OPTIONS='--import ./instrument.server.mjs causes all Node processes, including the vite dev server to init the Sentry SDK.

This error here isn't very clear but it shows that Vite failed to run correctly with those Node options.

failed to load config from /Users/tim/Documents/Repositories/sentry-19.9-issue/vite.config.ts

If I remove the NODE_OPTIONS, remove instrument.server.mjs and move the Sentry.init to entry.server.tsx the app builds and serves in dev mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants
0