Skip to content

Could not find a declaration file for module '@sentry/node' #4744

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

Closed
3 tasks done
bonesoul opened this issue Mar 21, 2022 · 10 comments · Fixed by #4745
Closed
3 tasks done

Could not find a declaration file for module '@sentry/node' #4744

bonesoul opened this issue Mar 21, 2022 · 10 comments · Fixed by #4745
Assignees

Comments

@bonesoul
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/node

SDK Version

6.19.0

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

updated to 6.19.0 and now missing typescript definitions;

Error: src/lib/sentry.ts(7,25): error TS7016: Could not find a declaration file for module '@sentry/node'. '/home/runner/work/vizesizgezi.com/vizesizgezi.com/tasks/node_modules/@sentry/node/dist/index.js' implicitly has an 'any' type.

Expected Result

definitions.

Actual Result

none

@AbhiPrasad
Copy link
Member

Hey thanks for reporting, we are taking a look!

@RobinCsl
Copy link

It seems related to #4724

@lforst
Copy link
Contributor

lforst commented Mar 21, 2022

@bonesoul we changed where we store the type definitions in the package. Could you provide information

  • about your typescript setup (ie. tsconfig and/or any CLI options)?
  • on how you're importing the SDK?

@nshyam97
Copy link

@lforst Same issues with @sentry/react. Using a tsconfig file and using Sentry.init within the ts file to initialise sentry

@Bobakanoosh
Copy link
Contributor

@lforst On a fresh typescript package, after running pnpm i @sentry/node, and importing like import * as Sentry from "@sentry/node" the types are not recognized properly

@Lms24
Copy link
Member

Lms24 commented Mar 21, 2022

Hi everyone, we've identified the issue and we're working on a fix. This unfortunately affects most of the JS SDKs. We'll release a patch ASAP.

@lforst
Copy link
Contributor

lforst commented Mar 21, 2022

Hi everyone! We just published a patch for the package (6.19.1). Please let us know if updating to the newest version fixes the issue for you!

@n4bb12
Copy link
Contributor

n4bb12 commented Mar 21, 2022

Hi everyone! We just published a patch for the package (6.19.1). Please let us know if updating to the newest version fixes the issue for you!

Yes, 6.19.1 fixed it for us. Thank you very much.

@lforst
Copy link
Contributor

lforst commented Mar 21, 2022

Yes, 6.19.1 fixed it for us. Thank you very much.

Great to hear! I will mark this issue as resolved.

Thanks @bonesoul for raising the issue and @RobinCsl for helping us find the cause!

@devguydavid
Copy link

Looks like it is working. Thanks!

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.

9 participants