-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
Cannot find module 'node:stream' or its corresponding type declarations #550
Comments
From version file-type version 16 to 17, it changed from a CommonJS to ES-Module. To isolate the issue, you may want to try the latest 16.x first. Can you create a simple repo reproducing the issue @dpopp07? |
1 similar comment
From version file-type version 16 to 17, it changed from a CommonJS to ES-Module. To isolate the issue, you may want to try the latest 16.x first. Can you create a simple repo reproducing the issue @dpopp07? |
@Borewit thanks for the reply. Everything is working fine with 16.5.4, I ran into these issues when trying to use v17. I should be able to create a simple repo to reproduce, good idea. I'll try to do that soon |
Okay @Borewit I created a simple project to reproduce. While I was putting this together, I learned that installing |
Adding |
I've just updated the
file-type
dependency in a TS package I maintain from v7 to v17. I made the necessary code updates but I cannot build my code with TS - I get several errors, all coming fromfile-type
or associated packages from withinnode_modules
. Every error is the same:Cannot find module 'node:stream' or its corresponding type declarations.
and it occurs in 5 places:node_modules/file-type/core.d.ts:1:42
node_modules/file-type/index.d.ts:1:42
node_modules/peek-readable/lib/StreamReader.d.ts:2:26
node_modules/strtok3/lib/core.d.ts:3:26
node_modules/strtok3/lib/ReadStreamTokenizer.d.ts:3:26
Any idea why I might seeing this? I'm not ruling out that it could be an issue in my environment but I'm not seeing any issue in my code, just in the dependencies.
I've tried with Node versions
14.17.5
,16.16.0
, and18.6.0
.I've also tried with TypeScript versions
4.7.4
(latest) and3.8.3
(what we normally use for compatibility).I would appreciate any insight here!
Screenshot of all the errors:
The text was updated successfully, but these errors were encountered: