Skip to content
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

Typescript error: Cannot find type definition file for 'node' #1132

Closed
ItsNoHax opened this issue Oct 15, 2020 · 8 comments
Closed

Typescript error: Cannot find type definition file for 'node' #1132

ItsNoHax opened this issue Oct 15, 2020 · 8 comments

Comments

@ItsNoHax
Copy link

ItsNoHax commented Oct 15, 2020

Similar to: getsentry/sentry-javascript#2927

Node types are missing and fail my tsc step.
Error:

$ tsc
node_modules/@sentry/hub/dist/interfaces.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.

1 /// <reference types="node" />
                        ~~~~

node_modules/@sentry/hub/dist/interfaces.d.ts:3:25 - error TS2307: Cannot find module 'domain'.

3 import * as domain from 'domain';
                          ~~~~~~~~

Found 2 errors.

As a temporary workaround I tried adding @types/node to my own devDependencies but it started overriding react-native methods and gave other problems.

"@sentry/react-native": "^1.9.0",

@jennmueng
Copy link
Member

@ItsNoHax My colleagues over at @getsentry/javascript are aware of the node types issue and are currently working to fix it. I'll include the fix in a new release and let you know once I hear anything from them.

What's unusual however, is Span shouldn't even be exported from the react native package, nor even exported from @sentry/core are you getting the package from some branch/fork?

@ItsNoHax
Copy link
Author

ItsNoHax commented Oct 19, 2020

Hi @jennmueng ,
Great to hear!

You are right. I did a clean install and I no longer see the Span error. No clue how that happened!

@kamilogorek
Copy link
Contributor

Thanks for letting us know. Cheers!

@ItsNoHax
Copy link
Author

Why did you close the issue @kamilogorek? The original error of node-types is still happening.

@kamilogorek kamilogorek reopened this Oct 27, 2020
@kamilogorek
Copy link
Contributor

Got it, my bad. Read your last comment as resolved. Reopened.

@ItsNoHax
Copy link
Author

Hi @jennmueng @kamilogorek , I see the bug has been fixed upstream. Any ETA on when it will be fixed in this package?

@jennmueng
Copy link
Member

@ItsNoHax This fix should be included in 2.0.1.

@ItsNoHax
Copy link
Author

Can confirm it's fixed. Thanks a lot @jennmueng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants