I am currently converting my Typescript project to fully ESM ("type": "module" in package.json and
"moduleResolution": "Node16" in tsconfig).
The import statement:
import tsconfigPaths from 'vite-tsconfig-paths';
now gives me the following error message:
Could not find a declaration file for module 'vite-tsconfig-paths'. 'D:/proj/AtlasCopco/EnsoUi/node_modules/.pnpm/vite-tsconfig-paths@3.5.0_vite@3.0.4/node_modules/vite-tsconfig-paths/dist/index.mjs' implicitly has an 'any' type.
I looked in the package.json of vite-tsconfig-paths and it seems there is a type declaration missing for the exports:
I am currently converting my Typescript project to fully ESM ("type": "module" in package.json and "moduleResolution": "Node16" in tsconfig).
The import statement:
import tsconfigPaths from 'vite-tsconfig-paths';
now gives me the following error message:
Could not find a declaration file for module 'vite-tsconfig-paths'. 'D:/proj/AtlasCopco/EnsoUi/node_modules/.pnpm/vite-tsconfig-paths@3.5.0_vite@3.0.4/node_modules/vite-tsconfig-paths/dist/index.mjs' implicitly has an 'any' type.
I looked in the package.json of vite-tsconfig-paths and it seems there is a type declaration missing for the exports:
If I manually change this to:
the error goes away.