umi icon indicating copy to clipboard operation
umi copied to clipboard

Add the types condition to the package.json#exports

Open richardpg2 opened this issue 1 year ago • 2 comments

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 https://github.com/gxmari007/vite-plugin-eslint/pull/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

richardpg2 avatar Aug 24 '23 03:08 richardpg2