Title: [@sentry/node] "Cannot find name" TypeScript build errors · Issue #1530 · getsentry/sentry-javascript · GitHub
Open Graph Title: [@sentry/node] "Cannot find name" TypeScript build errors · Issue #1530 · getsentry/sentry-javascript
X Title: [@sentry/node] "Cannot find name" TypeScript build errors · Issue #1530 · getsentry/sentry-javascript
Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javascript/releases Package + Version @sentry...
Open Graph Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
X Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/1530
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[@sentry/node] \"Cannot find name\" TypeScript build errors","articleBody":"\u003c!-- Requirements: please go through this checklist before opening a new issue -->\r\n\r\n- [X] Review the documentation: https://docs.sentry.io/\r\n- [X] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues\r\n- [X] Use the latest release: https://github.com/getsentry/sentry-javascript/releases\r\n\r\n## Package + Version\r\n\r\n- [ ] `@sentry/browser`\r\n- [X] `@sentry/node`\r\n- [ ] `raven-js`\r\n- [ ] `raven-node` _(raven for node)_\r\n- [ ] other:\r\n\r\n### Version:\r\n\r\n```\r\n4.0.0-rc.2\r\n```\r\n\r\n## Description\r\n\r\nPerhaps I've not correctly configured my TypeScript environment or something, but I cannot seem to successfully run `tsc --build` with @sentry/node, getting the following errors:\r\n\r\n```\r\nnode_modules/@sentry/node/dist/handlers.d.ts:2:49 - error TS2304: Cannot find name 'Request'.\r\n\r\n2 export declare function requestHandler(): (req: Request, res: Response, next: () => void) => void;\r\n ~~~~~~~\r\n\r\nnode_modules/@sentry/node/dist/handlers.d.ts:2:63 - error TS2304: Cannot find name 'Response'.\r\n\r\n2 export declare function requestHandler(): (req: Request, res: Response, next: () => void) => void;\r\n ~~~~~~~~\r\n\r\nnode_modules/@sentry/node/dist/handlers.d.ts:13:71 - error TS2304: Cannot find name 'Request'.\r\n\r\n13 export declare function errorHandler(): (error: MiddlewareError, req: Request, res: Response, next: (error: MiddlewareError) => void) => void;\r\n ~~~~~~~\r\n\r\nnode_modules/@sentry/node/dist/handlers.d.ts:13:85 - error TS2304: Cannot find name 'Response'.\r\n\r\n13 export declare function errorHandler(): (error: MiddlewareError, req: Request, res: Response, next: (error: MiddlewareError) => void) => void;\r\n ~~~~~~~~\r\n\r\nnode_modules/@sentry/node/dist/transports/base.d.ts:8:53 - error TS2304: Cannot find name 'URL'.\r\n\r\n8 request(options: http.RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;\r\n ~~~\r\n```\r\n\r\nIn case it is my TypeScript configuration, the contents of tsconfig.json is:\r\n\r\n```\r\n{\r\n\t\"compilerOptions\": {\r\n\t\t\"module\": \"commonjs\",\r\n\t\t\"target\": \"es2017\",\r\n\t\t\"lib\": [\r\n\t\t\t\"es2017\"\r\n\t\t],\r\n\t\t\"moduleResolution\": \"node\",\r\n\t\t\"rootDir\": \"./\",\r\n\t\t\"sourceMap\": true,\r\n\t\t\"allowJs\": true,\r\n\t\t\"noImplicitAny\": true,\r\n\t\t\"noUnusedLocals\": true,\r\n\t\t\"noImplicitThis\": true,\r\n\t\t\"strictNullChecks\": true,\r\n\t\t\"noImplicitReturns\": true,\r\n\t\t\"preserveConstEnums\": true,\r\n\t\t\"suppressImplicitAnyIndexErrors\": true,\r\n\t\t\"forceConsistentCasingInFileNames\": true,\r\n\t\t\"strict\": true\r\n\t},\r\n\t\"exclude\": [\r\n\t\t\"node_modules\",\r\n\t\t\"build\",\r\n\t\t\"webpack\"\r\n\t],\r\n\t\"types\": [\r\n\t\t\"typePatches\"\r\n\t]\r\n}\r\n```\r\n\r\nAnd a simple use case:\r\n\r\n```\r\nimport { init } from \"@sentry/node\";\r\n\r\ninit({\r\n\tdsn: \"...\"\r\n});\r\n```","author":{"url":"https://github.com/Aquilosion","@type":"Person","name":"Aquilosion"},"datePublished":"2018-09-14T08:12:04Z","url":"https://github.com/getsentry/sentry-javascript/issues/1530"}
| 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:1ef0521d-43df-4d3d-23d6-58c1578ebd7a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBDA:1F63A9:19DA52:23D9FA:6B044847 |
| html-safe-nonce | be87962940e4ab6b0e5a6a1fd1cc72a9f775e7b5d609c44fc7f84bd5b4f56421 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkRBOjFGNjNBOToxOURBNTI6MjNEOUZBOjZCMDQ0ODQ3IiwidmlzaXRvcl9pZCI6IjQ1NTA5NTM2MzY0NjkxNjQxMDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 04f6c0e1b422dc042a1b4c50151d8909ba4a0c68946c3bcf74be333ad7d60c59 |
| hovercard-subject-tag | issue:360200939 |
| 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/1530/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d6abd25204b2186bf224005f827a40263e4658a60f30d20e9b630f63fa3dac4c/getsentry/sentry-javascript/issues/1530 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d6abd25204b2186bf224005f827a40263e4658a60f30d20e9b630f63fa3dac4c/getsentry/sentry-javascript/issues/1530 |
| og:image:alt | Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Aquilosion |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| 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 | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| 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