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

[FIX] Add "types" to the "exports" section of package.json #150

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

jkonowitch
Copy link
Contributor

When using "module": "NodeNext", Typescript expects to find a "types" property in the package.json "exports" declaration - see docs.

Because slimdom.js does not, I receive this error.

Could not find a declaration file for module 'slimdom'. '/node_modules/.pnpm/[email protected]/node_modules/slimdom/dist/slimdom.esm.js' implicitly has an 'any' type.
  There are types at '/node_modules/slimdom/dist/slimdom.d.ts', but this result could not be resolved when respecting package.json "exports". The 'slimdom' library may need to update its package.json or typings.ts

I have tested this locally, and this resolves the issue.

@bwrrp
Copy link
Owner

bwrrp commented Mar 15, 2024

Awesome, thanks for figuring this out!

@bwrrp bwrrp merged commit 342b9ff into bwrrp:main Mar 15, 2024
4 checks passed
@jkonowitch jkonowitch deleted the package-json-exports branch March 15, 2024 16:57
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 this pull request may close these issues.

2 participants