metaplex-foundation / js-deprecated

Deprecated Metaplex JavaScript SDK
https://metaplex-foundation.github.io/js/
MIT License
128 stars 77 forks source link

Can't use library - typescript error with bn.js dependancy #169

Closed dino-rodriguez closed 2 years ago

dino-rodriguez commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: Install metaplex js Attempt to import something from it and run

Expected behavior A clear and concise description of what you expected to happen.

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/transactions/EndAuction.d.ts:1:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

1 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/transactions/InitAuctionManagerV2.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/transactions/RedeemParticipationBidV3.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/transactions/RedeemPrintingV2Bid.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/accounts/Edition.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/accounts/EditionMarker.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/accounts/MasterEdition.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/transactions/CreateMasterEdition.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/transactions/CreateMasterEditionV3.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/transactions/MintNewEditionFromMasterEditionViaToken.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/accounts/ExternalPriceAccount.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/accounts/Vault.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/ActivateVault.d.ts:2:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

2 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/AddSharesToTreasury.d.ts:2:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

2 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/AddTokenToInactiveVault.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/MintFractionalShares.d.ts:2:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

2 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/WithdrawSharesFromTreasury.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/WithdrawTokenFromSafetyDepositBox.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex/js/lib/actions/addTokensToVault.d.ts:1:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

1 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex/js/lib/actions/createMasterEdition.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex/js/lib/actions/placeBid.d.ts:1:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

1 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex/js/lib/actions/redeemPrintingV2Bid.d.ts:1:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

1 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex/js/lib/transactions/MintTo.d.ts:2:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

2 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
  1 {

node_modules/@solana/spl-token/lib/index.d.ts:11:10 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

11   import BN from 'bn.js';
            ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/borsh/lib/index.d.ts:2:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/borsh/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

2 import BN from 'bn.js';
         ~~

  node_modules/borsh/node_modules/@types/bn.js/index.d.ts:586:1
    586 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

Found 37 errors.

/Users/dinorodriguez/Code/indie/sol-metadata-experiment/index.js:61
                    return [4 /*yield*/, fetch(solanaMetadata.data.data.uri)];
                    ^

ReferenceError: fetch is not defined
    at /Users/dinorodriguez/Code/indie/sol-metadata-experiment/index.js:61:21
    at step (/Users/dinorodriguez/Code/indie/sol-metadata-experiment/index.js:33:23)
    at Object.next (/Users/dinorodriguez/Code/indie/sol-metadata-experiment/index.js:14:53)
    at fulfilled (/Users/dinorodriguez/Code/indie/sol-metadata-experiment/index.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
λ › v package.json                             indie/sol-metadata-experiment  main
λ › rm -rf node_modules                        indie/sol-metadata-experiment  main
λ › yarn install                               indie/sol-metadata-experiment  main
yarn install v1.22.10
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > @metaplex/js@4.12.0" has unmet peer dependency "@metaplex-foundation/mpl-auction@^0.0.2".
warning " > @metaplex/js@4.12.0" has unmet peer dependency "@metaplex-foundation/mpl-core@^0.0.2".
warning " > @metaplex/js@4.12.0" has unmet peer dependency "@metaplex-foundation/mpl-metaplex@^0.0.5".
warning " > @metaplex/js@4.12.0" has unmet peer dependency "@metaplex-foundation/mpl-token-metadata@^0.0.2".
warning " > @metaplex/js@4.12.0" has unmet peer dependency "@metaplex-foundation/mpl-token-vault@^0.0.2".
warning " > @metaplex/js@4.12.0" has unmet peer dependency "@solana/spl-token@^0.1.8".
[4/4] 🔨  Building fresh packages...
✨  Done in 1.69s.
λ › tsc index.ts ; node index.js               indie/sol-metadata-experiment  main
node_modules/@metaplex-foundation/mpl-auction/dist/src/accounts/Auction.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-auction/dist/src/accounts/AuctionExtended.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-auction/dist/src/accounts/BidderMetadata.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-auction/dist/src/transactions/CreateAuction.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-auction/dist/src/transactions/CreateAuctionV2.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-auction/dist/src/transactions/PlaceBid.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-core/dist/src/utils/tupleNumeric.d.ts:1:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

1 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/accounts/AuctionManager.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/accounts/BidRedemptionTicket.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/accounts/PayoutTicket.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/accounts/PrizeTrackingTicket.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/accounts/SafetyDepositConfig.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/transactions/EndAuction.d.ts:1:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

1 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/transactions/InitAuctionManagerV2.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/transactions/RedeemParticipationBidV3.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-metaplex/dist/src/transactions/RedeemPrintingV2Bid.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/accounts/Edition.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/accounts/EditionMarker.d.ts:4:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

4 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/accounts/MasterEdition.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/transactions/CreateMasterEdition.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/transactions/CreateMasterEditionV3.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-metadata/dist/src/transactions/MintNewEditionFromMasterEditionViaToken.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/accounts/ExternalPriceAccount.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/accounts/Vault.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/ActivateVault.d.ts:2:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

2 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/AddSharesToTreasury.d.ts:2:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

2 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/AddTokenToInactiveVault.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/MintFractionalShares.d.ts:2:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

2 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/WithdrawSharesFromTreasury.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex-foundation/mpl-token-vault/dist/src/transactions/WithdrawTokenFromSafetyDepositBox.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex/js/lib/actions/addTokensToVault.d.ts:1:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

1 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex/js/lib/actions/createMasterEdition.d.ts:3:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

3 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex/js/lib/actions/placeBid.d.ts:1:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

1 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex/js/lib/actions/redeemPrintingV2Bid.d.ts:1:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

1 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@metaplex/js/lib/transactions/MintTo.d.ts:2:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

2 import BN from 'bn.js';
         ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@solana/spl-token/lib/index.d.ts:11:10 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

11   import BN from 'bn.js';
            ~~

  node_modules/@types/bn.js/index.d.ts:594:1
    594 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/borsh/lib/index.d.ts:2:8 - error TS1259: Module '"/Users/dinorodriguez/Code/indie/sol-metadata-experiment/node_modules/borsh/node_modules/@types/bn.js/index"' can only be default-imported using the 'esModuleInterop' flag

2 import BN from 'bn.js';
         ~~

  node_modules/borsh/node_modules/@types/bn.js/index.d.ts:586:1
    586 export = BN;
        ~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

Additional context Add any other context about the problem here.

basvanberckel commented 2 years ago

You can enable "esModuleInterop" in your tsconfig, that should work around the issue for now.

dino-rodriguez commented 2 years ago

Thank you. I had it enabled but was using the global version of typescript instead of the locally installed one. Closing out this issue