metaplex-foundation / metaplex

A directory of what the Metaplex Foundation works on!
https://metaplex.com
Apache License 2.0
3.32k stars 6.26k forks source link

new updates | claimbid error when update from master #661

Closed JonLittleIT closed 2 years ago

JonLittleIT commented 3 years ago

./src/models/metaplex/claimBid 2.ts:10:54 Type error: Cannot find module '.' or its corresponding type declarations.`

8 | import { serialize } from 'borsh'; 9 | > 10 | import { getAuctionKeys, ClaimBidArgs, SCHEMA } from '.';

./src/models/metaplex/claimBid 2.ts:10:54 Type error: Cannot find module '.' or its corresponding type declarations.

JonLittleIT commented 3 years ago

./src/models/metaplex/claimBid 2.ts:10:54 Type error: Cannot find module '.' or its corresponding type declarations.`

8 | import { serialize } from 'borsh'; 9 | > 10 | import { getAuctionKeys, ClaimBidArgs, SCHEMA } from '.';

./src/models/metaplex/claimBid 2.ts:10:54 Type error: Cannot find module '.' or its corresponding type declarations.

any idea why I get this error in the packages web folder , trying to run a deploy. This new code added is giving more errors beforing updating from master branch.

jordaaash commented 3 years ago

Thanks for the report. Issues like this can be caused by a circular dependency as a result of the usage of

import [...] from '.';

The index.ts file in the directory is importing claimBid.ts which is in turn importing index.ts. Imports should be refactored so that they are explicit and don't rely on these index files. This helps with dependency resolution and tree shaking.

cc @bhgames

Edit: accidentally closed

github-actions[bot] commented 2 years ago

This Issue has received no activity for 30 days. We will close it in 2 days, please reopen if you are still experiencing this issue.