LibrePlex / libreplex-program-library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test mint

ljcljc opened this issue · comments

Any one knows how to run this test script? I want to test whether I can mint a single spl20 using this code.

https://github.com/LibrePlex/libreplex-program-library/blob/main/js-tests/mint.ts

I tried to run and it shows error
`tsc js-tests/mint.ts
js-tests/mint.ts:4:114 - error TS2307: Cannot find module '@libreplex/sdk' or its corresponding type declarations.

4 import {mintSingle, setupCollection, setUserPermissionsForGroup, UserPermission, updateCollectionAuthority} from "@libreplex/sdk"
~~~~~~~~~~~~~~~~

node_modules/@coral-xyz/anchor/dist/cjs/program/common.d.ts:1:8 - error TS1259: Module '"/solana/libreplex-program-library/node_modules/eventemitter3/index"' can only be default-imported using the 'esModuleInterop' flag

1 import EventEmitter from "eventemitter3";
~~~~~~~~~~~~

node_modules/eventemitter3/index.d.ts:134:1
134 export = EventEmitter;
~~~~~~~~~~~~~~~~~~~~~~
This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/account.d.ts:2:8 - error TS1259: Module '"/solana/libreplex-program-library/node_modules/eventemitter3/index"' can only be default-imported using the 'esModuleInterop' flag

2 import EventEmitter from "eventemitter3";
~~~~~~~~~~~~

node_modules/eventemitter3/index.d.ts:134:1
134 export = EventEmitter;
~~~~~~~~~~~~~~~~~~~~~~
This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

Found 3 errors in 3 files.

Errors Files
1 js-tests/mint.ts:4
1 node_modules/@coral-xyz/anchor/dist/cjs/program/common.d.ts:1
1 node_modules/@coral-xyz/anchor/dist/cjs/program/namespace/account.d.ts:2`