Skip to content

Could not find a declaration file for module @sentry/profiling-node #12568

@NatoBoram

Description

@NatoBoram

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/profiling-node

SDK Version

^8.10.0

Framework Version

v22.3.0

Link to Sentry event

SDK Setup

const options: NodeOptions = {
	dsn: SENTRY_DSN.toString(),
	environment: NODE_ENV,
	integrations: [nodeProfilingIntegration()],

	tracesSampleRate: 1.0,
	profilesSampleRate: 1.0,
}
Sentry.init(options)

Steps to Reproduce

diff --git a/package.json b/package.json
index ffb7a5f..0cc1896 100644
--- a/package.json
+++ b/package.json
@@ -47,9 +47,9 @@
 		"test": "vitest"
 	},
 	"dependencies": {
-		"@sentry/google-cloud-serverless": "^8.9.2",
-		"@sentry/node": "^8.9.2",
-		"@sentry/profiling-node": "^8.9.2",
+		"@sentry/google-cloud-serverless": "^8.10.0",
+		"@sentry/node": "^8.10.0",
+		"@sentry/profiling-node": "^8.10.0",
 		"dotenv": "^16.4.5",
 		"express": "^4.19.2",
 		"openai": "^4.51.0"

Expected Result

❯ pnpm build

> @natoboram/[email protected] build /home/nato/Code/github.com/NatoBoram/bug-report-sentry
> tsc

Actual Result

❯ pnpm build

> @natoboram/[email protected] build /home/nato/Code/github.com/NatoBoram/bug-report-sentry
> tsc

src/app.ts:3:42 - error TS7016: Could not find a declaration file for module '@sentry/profiling-node'. '/home/nato/Code/github.com/NatoBoram/bug-report-sentry/node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/esm/index.js' implicitly has an 'any' type.
  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';`

3 import { nodeProfilingIntegration } from "@sentry/profiling-node"
                                           ~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in src/app.ts:3

 ELIFECYCLE  Command failed with exit code 2.

Metadata

Metadata

Assignees

Labels

Package: nodeIssues related to the Sentry Node SDKPackage: profiling-nodeIssues related to the Sentry Profiling Node SDK

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions