question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sentry typescript type error introduced in 7.16.0

See original GitHub issue

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/serverless

SDK Version

7.16.0

Framework Version

Serverless

Link to Sentry event

No response

Steps to Reproduce

For my GCP serverless codebase,

Nodejs v16.13.2

Typescript 4.8.3

if I upgrade my sentry packages from 7.15.0 to 7.16.0, it gives error

Expected Result

No error

Actual Result

node_modules/@sentry/utils/types/browser.d.ts:4:69 - error TS2304: Cannot find name 'Window'.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
timfishcommented, Oct 24, 2022

We’ll maybe have to bring back getGlobalObject just for these functions.

Yeah, it doesn’t need to be exported and can be used only internally in utils

0reactions
AbhiPrasadcommented, Oct 24, 2022

Do you think a generic will work with a default type?

I don’t think so.

Oh, that is not the case since we can’t keep WINDOW in utils.

We can still keep it as long as it’s within a function call right? We don’t have to use the default generic, just leave it as T, same as getGlobalObject.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7.17.x breaks builds with "... is not exported from ..." #6074
I rolled back package.json to lock to ~7.16.0, and build is fine again. This is most definitely issue with sentry 7.17.x.
Read more >
@sentry/types - npm
Start using @sentry/types in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type declarations.
Read more >
sentry Changelog - PyUp.io
**Breaking Change**: This version introduces a change to the grouping of issues. The SDK now sets the `inApp` flag for frames originating from...
Read more >
Newest 'sentry' Questions - Page 2 - Stack Overflow
I'm using sentry to trace the code and have a list of error of my application. This application has a backend and two...
Read more >
Troubleshooting for JavaScript - Sentry Documentation
If you need help solving issues with your Sentry JavaScript SDK integration, ... This prevents any error reports, sessions health, or performance data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found