Title: unable to compile "Cannot find name 'Element'" · Issue #5673 · getsentry/sentry-javascript · GitHub
Open Graph Title: unable to compile "Cannot find name 'Element'" · Issue #5673 · getsentry/sentry-javascript
X Title: unable to compile "Cannot find name 'Element'" · Issue #5673 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/5673
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"unable to compile \"Cannot find name 'Element'\"","articleBody":"### Is there an existing issue for this?\n\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [X] I have reviewed the documentation https://docs.sentry.io/\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which package are you using?\n\n@sentry/node\n\n### SDK Version\n\n7.12.0\n\n### Framework Version\n\n_No response_\n\n### Link to Sentry event\n\n_No response_\n\n### Steps to Reproduce\n\n* create empty folder\r\n* switch to newly created folder\r\n* `npm init` (use defaults)\r\n* `npm i @sentry/node @types/node typescript`\r\n* `npx tsc --init` (create vanilla tsconfig)\r\n* change `lib` property within tsconfig.json to `ES2020`\r\n* change `skipLibCheck` to `false`\r\n* create simple source file `test.ts`\r\n```typescript\r\nimport { captureException } from \"@sentry/node\";\r\ncaptureException(new Error());\r\n```\r\n* run `npx tsc`\n\n### Expected Result\n\n`test.ts` should compile to `test.js`\n\n### Actual Result\n\nCompiling fails with this error:\r\n```shell\r\nnode_modules/@sentry/utils/types/browser.d.ts:22:58 - error TS2304: Cannot find name 'Element'.\r\n22 export declare function getDomElement(selector: string): Element | null;\r\n ~~~~~~~\r\nFound 1 error in node_modules/@sentry/utils/types/browser.d.ts:22\r\n```","author":{"url":"https://github.com/FrederikPriede","@type":"Person","name":"FrederikPriede"},"datePublished":"2022-09-01T12:40:30Z","url":"https://github.com/getsentry/sentry-javascript/issues/5673"}
| 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:ee082b44-d0b9-0f91-1033-a7f624169bd2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9CB8:25E63A:60B40F:84FFFE:6B0475C8 |
| html-safe-nonce | b8ff497853052eab8a1422a11a58db80ee14eb293c36d81ca0f7d0aa13c7e7d2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0I4OjI1RTYzQTo2MEI0MEY6ODRGRkZFOjZCMDQ3NUM4IiwidmlzaXRvcl9pZCI6IjI5NTk1MDA0Mjc0NTQwODQ1NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 53b92393c50e0c30fd0126a893e545e3dfba7d3ca9139f7e5ddf38e13fb23f16 |
| hovercard-subject-tag | issue:1358784877 |
| 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/5673/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f8979d99aad81affe162c02e5d2550e72dbf6e99023edd24296e7dce6068e0b8/getsentry/sentry-javascript/issues/5673 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f8979d99aad81affe162c02e5d2550e72dbf6e99023edd24296e7dce6068e0b8/getsentry/sentry-javascript/issues/5673 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | FrederikPriede |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| 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 | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| 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