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

ERROR in node_modules/@sentry/browser/dist/transports/base.d.ts(31,19): error TS2503: Cannot find namespace 'globalThis'. #2978

Closed
gopi-codejudge opened this issue Oct 16, 2020 · 4 comments · Fixed by #3033

Comments

@gopi-codejudge
Copy link

gopi-codejudge commented Oct 16, 2020

I am using @sentry/angular version 5.26.0. I am getting the above error while compiling. I am using angular 7. Is there a version of @sentry/angular version which is compatible?

@kamilogorek
Copy link
Contributor

You need at least TypeScript 3.4 in order to compile it. You should be able to bump it without any changes to your existing configuration, as Angular 7 ships with TS3.1 by default.

@pokono
Copy link

pokono commented Nov 5, 2020

Is there a version compatible with TS3.1 we can use? Updating is a no go in short term for production applications.

@kamilogorek
Copy link
Contributor

@pokono I'll fix this issue in a separate PR.

@nagagopi040
Copy link

Now, we are getting the following Error ERROR in node_modules/@sentry/hub/dist/session.d.ts(17,27): error TS2304: Cannot find name 'Omit'.

AbhiPrasad pushed a commit that referenced this issue Sep 26, 2022
- Replaces `getGlobalObject` global object detection with a modern implementation taken from `core-js` which is then modified/simplified a little
- Prioritises `globalThis` which was previously removed due to requiring a TypeScript version which was required in a no longer supported version of Angular (#2978)
  - This is a requirement for future support of other js runtimes (#5611)
- No longer uses `isNodeEnv` 🎉
- Caches the global so it doesn't need to be evaluated for every invocation of `getGlobalObject`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants