Title: Missing types in `@sentry/profiling-node` · Issue #12468 · getsentry/sentry-javascript · GitHub
Open Graph Title: Missing types in `@sentry/profiling-node` · Issue #12468 · getsentry/sentry-javascript
X Title: Missing types in `@sentry/profiling-node` · Issue #12468 · 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/12468
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing types in `@sentry/profiling-node`","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 SDK are you using?\n\n@sentry/node\n\n### SDK Version\n\n8.9.1\n\n### Framework Version\n\nNode 21.4.0\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\n_No response_\n\n### Steps to Reproduce\n\n1. Create a new project\r\n\r\n```\r\nnpm init\r\n```\r\n\r\n2. Install dependencies\r\n\r\n```\r\nnpm i typescript @sentry/profiling-node\r\n```\r\n\r\n3. Add a tsconfig.json\r\n\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"strict\": true\r\n }\r\n}\r\n```\r\n\r\n4. Create a file and import the module\r\n\r\n```ts\r\nimport { nodeProfilingIntegration } from '@sentry/profiling-node';\r\n```\n\n### Expected Result\n\nTypes are found\n\n### Actual Result\n\nTypes are not found. Error message in VS Code:\r\n\r\n```\r\nCould not find a declaration file for module '@sentry/profiling-node'. '/Users/[redacted]/sentry-types/node_modules/@sentry/profiling-node/lib/cjs/index.js' implicitly has an 'any' type.\r\n Try `npm i --save-dev @types/sentry__profiling-node` if it exists or add a new declaration (.d.ts) file containing `declare module '@sentry/profiling-node';`\r\n```\r\n\r\nLooking at the `package.json` file in the module, it specifies `lib/types/index.d.ts` for the types:\r\n\r\n```json\r\n{\r\n ...\r\n \"types\": \"lib/types/index.d.ts\",\r\n \"exports\": {\r\n \"./package.json\": \"./package.json\",\r\n \".\": {\r\n \"import\": {\r\n \"types\": \"./lib/types/index.d.ts\",\r\n \"default\": \"./lib/esm/index.js\"\r\n },\r\n \"require\": {\r\n \"types\": \"./lib/types/index.d.ts\",\r\n \"default\": \"./lib/cjs/index.js\"\r\n }\r\n }\r\n },\r\n ...\r\n}\r\n```\r\n\r\nHowever there is no file at that location.\r\n\r\n\u003cimg width=\"1158\" alt=\"Screenshot 2024-06-11 at 23 14 28\" src=\"https://github.com/getsentry/sentry-javascript/assets/12033907/d2c855d5-815a-47e8-9373-11d15d5c3e4b\">","author":{"url":"https://github.com/jstarmx","@type":"Person","name":"jstarmx"},"datePublished":"2024-06-11T22:16:15Z","url":"https://github.com/getsentry/sentry-javascript/issues/12468"}
| 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:b2378cd8-0b37-cddc-619d-f4dd40cb0be1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D3F2:822F:2180018:2AF3A01:6B03EF6A |
| html-safe-nonce | d0396f81359b1d2041312cbf6c2f7ca34ede9b7d077ef9d401c314b2249178a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0YyOjgyMkY6MjE4MDAxODoyQUYzQTAxOjZCMDNFRjZBIiwidmlzaXRvcl9pZCI6IjE5NjcxMDAyNTQ2MzM1ODY1MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5e7feb64ca796ad7cbe43b48772a82f2eaea9772176abc75c175502ad3ea8af9 |
| hovercard-subject-tag | issue:2347398940 |
| 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/12468/issue_layout |
| twitter:image | https://opengraph.githubassets.com/296b292420540b193e6ce252ef188e468b09f596de2ce3b3299c2e59ff41371d/getsentry/sentry-javascript/issues/12468 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/296b292420540b193e6ce252ef188e468b09f596de2ce3b3299c2e59ff41371d/getsentry/sentry-javascript/issues/12468 |
| 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 | jstarmx |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| 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