You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following compiler errors with Visual Studio
node_modules\@meshsdk\core\dist\common\constants.d.ts(1,21): error TS2307: Build:Cannot find module '@mesh/core' or its corresponding type declarations.
node_modules\@meshsdk\core\dist\common\constants.d.ts(2,31): error TS2307: Build:Cannot find module '@mesh/core' or its corresponding type declarations.
node_modules\@meshsdk\core\dist\common\contracts\fetcher.d.ts(1,100): error TS2307: Build:Cannot find module '@mesh/common/types' or its corresponding type declarations.
If I replace all the @mesh imports in constants.d.ts with relative paths:
import { csl } from '../core';
it does work as expected.
Another workaround is to add a module alias as following to tsconfig.json:
The use of out-of-band module aliasing (i.e. @mesh/*) also prevents Deno users from being able to click through to the type of interest within their IDE in cases where those types are imported using links which depend on these aliases. For example, within transaction.service.d.ts:
This may affect other tooling too, since the aliasing config has to be specified out-of-band (outside ESM) separately for each tool that needs it; hence why you have separate config for this in tsconfig.json and vite.config.js.
So I just switched to Node.js so I could use @meshsdk/mesh-csl, and I hit the same aliasing issues when using tsc to compile my TypeScript code. The solution I ended up going with was to have tsc ignore the library errors with:
I get the following compiler errors with Visual Studio
If I replace all the
@mesh
imports in constants.d.ts with relative paths:it does work as expected.
Another workaround is to add a module alias as following to tsconfig.json:
But it might be better to relative paths inside the .ts files.
The text was updated successfully, but these errors were encountered: