Skip to content

The following workaround prevents TypeScript using "bundler" throwing… #744

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

Merged
merged 2 commits into from
Mar 13, 2025

Conversation

Borewit
Copy link
Collaborator

@Borewit Borewit commented Mar 10, 2025

The following workaround prevents TypeScript using "bundler" throwing compilation errors, fileTypeFromFile, does not exist.

Unlike requiring to import /node or set the node condition in the TypeScript compiler configuration, this one works out of the box.

Also raised issue where it comes from:

Related to #741
Fixes #652

… compilation errors, fileTypeFromFile, does not exist.
@Borewit Borewit added the improvement Improvement of existing functionality label Mar 10, 2025
@Borewit Borewit self-assigned this Mar 10, 2025
@sindresorhus sindresorhus merged commit 90bfe33 into main Mar 13, 2025
6 checks passed
@sindresorhus sindresorhus deleted the workaround-importing-from-typescript branch March 13, 2025 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't access node functions when tsconfig moduleResolution is set to "bundler"
2 participants