solana-trading-cli icon indicating copy to clipboard operation
solana-trading-cli copied to clipboard

I compiled according to the documentation, and an error occurred when executing ts-node test.ts

Open JimmyChan7 opened this issue 8 months ago • 5 comments

(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 [14:36:21.807] INFO: ts-node unwrap_sol.js [14:36:21.963] INFO: Testing Meteora scripts... [14:36:22.904] INFO: ts-node buy --token <ADDRESS_TOKEN> --sol <NUMBER_OF_SOL> [14:36:23.994] INFO: ts-node sell --token <ADDRESS_TOKEN> --percentage <SELL_PERCENTAGE> [14:36:24.224] INFO: Testing Orca scripts... bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?) [14:36:25.555] INFO: ts-node buy --token <ADDRESS_TOKEN> --sol <NUMBER_OF_SOL> bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?) [14:36:27.003] INFO: ts-node sell --token <ADDRESS_TOKEN> --percentage <SELL_PERCENTAGE> [14:36:27.371] INFO: Testing Raydium scripts... bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?) [14:36:29.279] INFO: ts-node buy --token <ADDRESS_TOKEN> --sol <NUMBER_OF_SOL> bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?) [14:36:30.982] INFO: ts-node sell --token <ADDRESS_TOKEN> --percentage <SELL_PERCENTAGE> [14:36:31.161] INFO: Testing Pumpfun scripts... /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 ] } /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

JimmyChan7 avatar Apr 16 '25 06:04 JimmyChan7

It would be a ts environment issue, please join our discord channel to talk about it thx https://discord.gg/JCZYhzyV

outsmartchad avatar Apr 17 '25 19:04 outsmartchad

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

tarang8811 avatar May 02 '25 11:05 tarang8811

@outsmartchad can you please help me on this

tarang8811 avatar May 06 '25 05:05 tarang8811

this is the invitation link, https://discord.gg/BhFTafyF

outsmartchad avatar May 06 '25 11:05 outsmartchad

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.

forking-altcoins avatar Jun 05 '25 13:06 forking-altcoins