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

Could not find a declaration file for module #2

Open
IAluI opened this issue Jun 29, 2023 · 0 comments
Open

Could not find a declaration file for module #2

IAluI opened this issue Jun 29, 2023 · 0 comments

Comments

@IAluI
Copy link

IAluI commented Jun 29, 2023

I'm using typescript 5.1.3.
import * as windows1251 from 'windows-1251';
cause the next error
Could not find a declaration file for module 'windows-1251'. '/app/node_modules/windows-1251/windows-1251.mjs' implicitly has an 'any' type. There are types at '/app/node_modules/windows-1251/windows-1251.d.ts', but this result could not be resolved when respecting package.json "exports". The 'windows-1251' library may need to update its package.json or typings.

As far as i know types for *.mjs files should have *.d.mts extension (see 1, 2). And "types" field in package.json is not necessary.

Can you fix it? Or i can make a pull request if you don't mind.

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

No branches or pull requests

1 participant