spacebudz / lucid

Lucid is a library, which allows you to create Cardano transactions and off-chain code for your Plutus contracts in JavaScript, Deno and Node.js.
https://lucid.spacebudz.io
MIT License
336 stars 133 forks source link

No "exports" main defined while using lucid-cardano with typescript. #242

Open golddydev opened 5 months ago

golddydev commented 5 months ago

I got this error.

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /home/my_project/node_modules/lucid-cardano/package.json

My project is based on typescript and tsconfig-path. Here is my tsconfig.

{
  "compilerOptions": {
    "target": "ES2022",
    "allowJs": true,
    "esModuleInterop": true,
    "module": "commonjs",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "skipLibCheck": true,
    "skipDefaultLibCheck": true,
    "declaration": true,
    "sourceMap": false,
    "paths": {
      "@/*": ["src/*"],
    },
    "outDir": "./dist",
    "rootDir": "./src",
    "baseUrl": ".",
    "forceConsistentCasingInFileNames": true,
    "resolveJsonModule": true,
    "checkJs": false,
  },
  "include": ["src/"],
  "exclude": ["node_modules", "./src/contracts"],
}

Can you help me with this issue?