Skip to content
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

Can't run the project after @sentry/node 8.39.0 #15153

Closed
3 tasks done
dragospeta opened this issue Jan 24, 2025 · 3 comments
Closed
3 tasks done

Can't run the project after @sentry/node 8.39.0 #15153

dragospeta opened this issue Jan 24, 2025 · 3 comments
Labels
Package: node Issues related to the Sentry Node SDK

Comments

@dragospeta
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

8.39.0

Framework Version

Express 5.0.1

Link to Sentry event

No response

Reproduction Example/SDK Setup

After version 8.39.0, only if i import:

import * as Sentry from "@sentry/node";

i get this error:

/workspace/node_modules/@sentry/node/build/cjs/integrations/contextlines.js:12
const LRU_FILE_CONTENTS_CACHE = new core.LRUMap(10);
^

TypeError: core.LRUMap is not a constructor
at Object. (/workspace/node_modules/@sentry/node/src/integrations/contextlines.ts:7:33)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._compile (/workspace/node_modules/pirates/lib/index.js:117:24)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Object.newLoader [as .js] (/workspace/node_modules/pirates/lib/index.js:121:7)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object. (/workspace/node_modules/@sentry/node/build/cjs/index.js:8:22)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._compile (/workspace/node_modules/pirates/lib/index.js:117:24)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Object.newLoader [as .js] (/workspace/node_modules/pirates/lib/index.js:121:7)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object. (/workspace/src/app.js:3:1)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._compile (/workspace/node_modules/pirates/lib/index.js:117:24)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Object.newLoader [as .js] (/workspace/node_modules/pirates/lib/index.js:121:7)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.runMain (node:internal/modules/run_main:135:12)
at Object. (/workspace/node_modules/@babel/node/src/_babel-node.ts:159:12)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49

Steps to Reproduce

  1. Install version after 8.39.0
  2. Import sentry

Expected Result

The project to run normally.

Actual Result

The project start fails with an error.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 24, 2025
@github-actions github-actions bot added the Package: node Issues related to the Sentry Node SDK label Jan 24, 2025
@Lms24
Copy link
Member

Lms24 commented Jan 24, 2025

Hi @dragospeta thanks for writing in! I tried to reproduce this with the steps provided in this issue but couldn't. For me, importing and calling Sentry.init() works flawlessly, on 8.39.0 as well as 8.51.0. I'm fairly confident that there must be something else that needs to be added to the minimal reproduction to actually reproduce this.

Therefore, please provide a minimal reproduction so that we can investigate this further. Thanks!

@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Jan 24, 2025
@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 24, 2025
@Lms24 Lms24 added Waiting for: Community and removed Package: node Issues related to the Sentry Node SDK Waiting for: Product Owner labels Jan 24, 2025
@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Jan 24, 2025
@Lms24 Lms24 added the Package: node Issues related to the Sentry Node SDK label Jan 24, 2025
@dragospeta
Copy link
Author

dragospeta commented Jan 24, 2025

Thanks for the fast response. I've checked in the source code at const LRU_FILE_CONTENTS_CACHE = new core.LRUMap(10); i logged core with all its props, it exists, but LRUMap is missing from sentry/core in my case.(probably uses old version behind the scenes) I'm aware it looks like an isolated behaviour that happens on my end.

Tried to us package.json resolutions to force "@sentry/core": "8.51.0" but still has that property missing from the whole sentry/core project.

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 24, 2025
@dragospeta
Copy link
Author

Removed sentry from node_modules, removed yarn.lock, reinstalled and worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: node Issues related to the Sentry Node SDK
Projects
Archived in project
Development

No branches or pull requests

2 participants