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

Add the types condition to the package.json#exports #83

Open
richardpg2 opened this issue Aug 24, 2023 · 2 comments
Open

Add the types condition to the package.json#exports #83

richardpg2 opened this issue Aug 24, 2023 · 2 comments

Comments

@richardpg2
Copy link

Could not find a declaration file for module '@metaplex-foundation/umi-web3js-adapters'. './node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]/node_modules/@metaplex-foundation/umi-web3js-adapters/dist/esm/index.mjs' implicitly has an 'any' type. There are types at '/Volumes/Richard/Work/Research/stack/ReactJs/vite-app-testg/node_modules/@metaplex-foundation/umi-web3js-adapters/dist/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@metaplex-foundation/umi-web3js-adapters' library may need to update its package.json or typings.

Suggested solution:
Correctly link the declaration files, as seen in gxmari007/vite-plugin-eslint#60. Updating the package.json will make this package compatible with the new moduleResolution option.

https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing

@lorisleiva
Copy link
Collaborator

Hi there, sorry for the late reply. Is this what you had in mind? #86

@lorisleiva
Copy link
Collaborator

I've published a new patch update with that change. Let me know if that fixes your issue. 🙏

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

2 participants