I compiled according to the documentation, and an error occurred when executing ts-node test.ts
(node:87250) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
[14:36:19.291] INFO: Testing helper scripts...
(node:87288) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
[14:36:20.841] INFO: ts-node wrap_sol.js --size
47 public program: Program<PumpFun>; ~~~~~~~ src/pumpfunsdk/pumpdotfun-sdk/src/pumpfun.ts:50:32 - error TS2344: Type 'PumpFun' does not satisfy the constraint 'Idl'. Type 'PumpFun' is missing the following properties from type 'Idl': version, name
50 this.program = new Program<PumpFun>(IDL as PumpFun, provider); ~~~~~~~
at createTSError (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:863:19)
at getOutput (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1077:36)
at Object.compile (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1433:41)
at Module.m._compile (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)
at Object.require.extensions.<computed> [as .ts] (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1249:32)
at Function.Module._load (node:internal/modules/cjs/loader:1065:12)
at Module.require (node:internal/modules/cjs/loader:1271:19) {
diagnosticCodes: [ 2344, 2344 ] } /Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:859 return new TSError(diagnosticText, diagnosticCodes, diagnostics); ^ TSError: ⨯ Unable to compile TypeScript: src/pumpfunsdk/pumpdotfun-sdk/src/pumpfun.ts:47:27 - error TS2344: Type 'PumpFun' does not satisfy the constraint 'Idl'. Type 'PumpFun' is missing the following properties from type 'Idl': version, name
47 public program: Program<PumpFun>; ~~~~~~~ src/pumpfunsdk/pumpdotfun-sdk/src/pumpfun.ts:50:32 - error TS2344: Type 'PumpFun' does not satisfy the constraint 'Idl'. Type 'PumpFun' is missing the following properties from type 'Idl': version, name
50 this.program = new Program<PumpFun>(IDL as PumpFun, provider); ~~~~~~~
at createTSError (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:863:19)
at getOutput (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1077:36)
at Object.compile (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1433:41)
at Module.m._compile (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)
at Object.require.extensions.<computed> [as .ts] (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1249:32)
at Function.Module._load (node:internal/modules/cjs/loader:1065:12)
at Module.require (node:internal/modules/cjs/loader:1271:19) {
diagnosticCodes: [ 2344, 2344 ] } /Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:859 return new TSError(diagnosticText, diagnosticCodes, diagnostics); ^ TSError: ⨯ Unable to compile TypeScript: src/pumpfunsdk/pumpdotfun-sdk/src/pumpfun.ts:47:27 - error TS2344: Type 'PumpFun' does not satisfy the constraint 'Idl'. Type 'PumpFun' is missing the following properties from type 'Idl': version, name
47 public program: Program<PumpFun>; ~~~~~~~ src/pumpfunsdk/pumpdotfun-sdk/src/pumpfun.ts:50:32 - error TS2344: Type 'PumpFun' does not satisfy the constraint 'Idl'. Type 'PumpFun' is missing the following properties from type 'Idl': version, name
50 this.program = new Program<PumpFun>(IDL as PumpFun, provider); ~~~~~~~
at createTSError (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:863:19)
at getOutput (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1077:36)
at Object.compile (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1433:41)
at Module.m._compile (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)
at Object.require.extensions.<computed> [as .ts] (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1249:32)
at Function.Module._load (node:internal/modules/cjs/loader:1065:12)
at Module.require (node:internal/modules/cjs/loader:1271:19) {
diagnosticCodes: [ 2344, 2344 ] } node:internal/modules/cjs/loader:1189 throw err; ^
Error: Cannot find module './copy-trade.ts' Require stack:
- /Users/jimmy/Documents/jimmy/solanabot/newbot/solana-trading-cli/src/grpc_streaming_dev/grpc-copy-bot/src/streaming/imaginaryUncacheableRequireResolveScript
at Module._resolveFilename (node:internal/modules/cjs/loader:1186:15)
at Function.resolve (node:internal/modules/helpers:133:19)
at requireResolveNonCached (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/dist/bin.js:549:16)
at getProjectSearchDir (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/dist/bin.js:519:40)
at phase3 (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/dist/bin.js:267:27)
at bootstrap (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/dist/bin.js:47:30)
at main (/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/dist/bin.js:33:12)
at Object.
(/Users/jimmy/.nvm/versions/node/v22.2.0/lib/node_modules/ts-node/dist/bin.js:579:5) at Module._compile (node:internal/modules/cjs/loader:1434:14) at Module._extensions..js (node:internal/modules/cjs/loader:1518:10) { code: 'MODULE_NOT_FOUND', requireStack: [ '/Users/jimmy/Documents/jimmy/solanabot/newbot/solana-trading-cli/src/grpc_streaming_dev/grpc-copy-bot/src/streaming/imaginaryUncacheableRequireResolveScript' ] }
Node.js v22.2.0
It would be a ts environment issue, please join our discord channel to talk about it thx https://discord.gg/JCZYhzyV
Hello, I am facing the same issue and tried to join the discord but shows invitation invalid. Can you please share a new link to join
@outsmartchad can you please help me on this
this is the invitation link, https://discord.gg/BhFTafyF
can you please help me on this
ubuntu@ubuntu-vm:~/Solana-Bot/solana-trading-cli$ npm install npm warn ERESOLVE overriding peer dependency npm warn While resolving: @metaplex-foundation/[email protected] npm warn Found: @metaplex-foundation/[email protected] npm warn node_modules/@metaplex-foundation/umi npm warn @metaplex-foundation/umi@"^0.9.1" from the root project npm warn 14 more (@metaplex-foundation/mpl-candy-machine, ...) npm warn npm warn Could not resolve dependency: npm warn peer @metaplex-foundation/umi@"^0.8.2" from @metaplex-foundation/[email protected] npm warn node_modules/@metaplex-foundation/mpl-candy-machine/node_modules/@metaplex-foundation/mpl-token-metadata npm warn @metaplex-foundation/mpl-token-metadata@"3.0.0-alpha.27" from @metaplex-foundation/[email protected] npm warn node_modules/@metaplex-foundation/mpl-candy-machine npm warn npm warn Conflicting peer dependency: @metaplex-foundation/[email protected] npm warn node_modules/@metaplex-foundation/umi npm warn peer @metaplex-foundation/umi@"^0.8.2" from @metaplex-foundation/[email protected] npm warn node_modules/@metaplex-foundation/mpl-candy-machine/node_modules/@metaplex-foundation/mpl-token-metadata npm warn @metaplex-foundation/mpl-token-metadata@"3.0.0-alpha.27" from @metaplex-foundation/[email protected] npm warn node_modules/@metaplex-foundation/mpl-candy-machine npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: '@bloxroute/[email protected]', npm warn EBADENGINE required: { node: '<22' }, npm warn EBADENGINE current: { node: 'v22.2.0', npm: '10.7.0' } npm warn EBADENGINE }
up to date, audited 1712 packages in 2s
54 vulnerabilities (2 low, 7 moderate, 45 high)
To address issues that do not require attention, run: npm audit fix
To address all issues possible (including breaking changes), run: npm audit fix --force
Some issues need review, and may require choosing a different dependency.
Run npm audit for details.