Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use "yarn start"show error! #76

Open
hk8846 opened this issue Jul 24, 2024 · 17 comments
Open

use "yarn start"show error! #76

hk8846 opened this issue Jul 24, 2024 · 17 comments
Labels

Comments

@hk8846
Copy link

hk8846 commented Jul 24, 2024

I use "yarn start",then show error:
\solana-jupiter-bot-main\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^

Error: Cannot find module 'rpc-websockets/dist/lib/client'

but I use "yarn" init all package in my project,please help me!!!

@chlarsen
Copy link

chlarsen commented Aug 6, 2024

Same here. I guess the versions required in yarn.lock are out of date.

@ngocbv
Copy link

ngocbv commented Aug 13, 2024

any insight? @hk8846 @chlarsen

@T1CkShot
Copy link

Try yarn install beforehand

@chlarsen
Copy link

Alas, this does not seem to do the trick. Tried a completely new install, tried both "yarn install" and "yarn" individually and in different order, yet no luck.
Here is what I get:

$ yarn start
yarn run v1.22.22
$ node --no-deprecation ./src/index.js && node --no-deprecation ./src/bot/index.js
/home/chris/solana-jupiter-bot/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Cannot find module 'rpc-websockets/dist/lib/client'
Require stack:
- /home/chris/solana-jupiter-bot/node_modules/@jup-ag/common/node_modules/@solana/web3.js/lib/index.cjs.js
- /home/chris/solana-jupiter-bot/node_modules/@jup-ag/common/dist/index.js
- /home/chris/solana-jupiter-bot/node_modules/@jup-ag/core/dist/core.cjs.production.min.js
- /home/chris/solana-jupiter-bot/node_modules/@jup-ag/core/dist/index.js
- /home/chris/solana-jupiter-bot/src/wizard/Pages/Tokens.js
- /home/chris/solana-jupiter-bot/node_modules/import-jsx/index.js
- /home/chris/solana-jupiter-bot/src/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/home/chris/solana-jupiter-bot/node_modules/@jup-ag/common/node_modules/@solana/web3.js/lib/index.cjs.js:20:32)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/chris/solana-jupiter-bot/node_modules/@jup-ag/common/node_modules/@solana/web3.js/lib/index.cjs.js',
    '/home/chris/solana-jupiter-bot/node_modules/@jup-ag/common/dist/index.js',
    '/home/chris/solana-jupiter-bot/node_modules/@jup-ag/core/dist/core.cjs.production.min.js',
    '/home/chris/solana-jupiter-bot/node_modules/@jup-ag/core/dist/index.js',
    '/home/chris/solana-jupiter-bot/src/wizard/Pages/Tokens.js',
    '/home/chris/solana-jupiter-bot/node_modules/import-jsx/index.js',
    '/home/chris/solana-jupiter-bot/src/index.js'
  ]
}

Node.js v20.17.0
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any thoughts? Thank you!

@T1CkShot
Copy link

https://stackoverflow.com/questions/78566652/solana-web3-js-cannot-find-module-rpc-websockets-dist-lib-client

manually downgrade rpc-websockets package to 7.11.0 by setting it in the package json

@chlarsen
Copy link

Thank you again, @T1CkShot. I now get:

$ yarn start
yarn run v1.22.22
$ node --no-deprecation ./src/index.js && node --no-deprecation ./src/bot/index.js
/home/chris/solana-jupiter-bot/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (/home/chris/solana-jupiter-bot/node_modules/@solana/web3.js/lib/index.cjs.js:4233:48)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/home/chris/solana-jupiter-bot/src/utils/index.js:7:44)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)

Node.js v20.17.0
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any ideas? A huge "Thank you!"

@L2b2n
Copy link

L2b2n commented Aug 27, 2024

Install whis Node 16 , and run whis Node 18

@chlarsen
Copy link

Node v. 16 is too outdated, and yarn fails completely. Node v. 18 installs OK, with downgraded rpc-websockets. However the error reported by myself before is still the same.

@L2b2n
Copy link

L2b2n commented Aug 28, 2024

Oh sry install whis 18 and run whis 16

@T1CkShot
Copy link

Try this,
First upgrade @solana/web3.js by yarn upgrade @solana/web3.js then remove the node modules and reinstall with yarn install
Also use node 18 instead of 20 and see if it works.
@chlarsen

@chlarsen
Copy link

chlarsen commented Aug 29, 2024

Thank you @T1CkShot!
Here is what I did:
I installed nodejs v18, which is routinely distributed with Debian bookworm:

apt install nodejs

Next I installed yarn:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt update
apt install yarn

I then run the following as non-privileged user:

cd
git clone https://github.com/ARBProtocol/solana-jupiter-bot.git
cd ./solana-jupiter-bot
yarn install
yarn upgrade @solana/web3.js
rm -rf ./node_modules
yarn install

Note: No downgrading of rpc-websocket seems to be required.
I created a suitable .env, and then issued as non-privileged user:

yarn start

I get:

             ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
             ┃                                                                              ┃
             ┃                                                                              ┃
             ┃                                                                              ┃
             ┃  ▄▀█ █▀█ █▄▄    █ █ █ █▀█ █ ▀█▀ █▀▀ █▀█  █▄▄ █▀█ ▀█▀                         ┃
      network┃  █▀█ █▀▄ █▄█  █▄█ █▄█ █▀▀ █  █  ██▄ █▀▄  █▄█ █▄█  █                          ┃
          rpc┃                                                                              ┃
     strategy┃                                                                              ┃
       tokens┃  ──────────────────── network ────────────────────                           ┃
 trading size┃                                                                              ┃
       profit┃ Select Solana Network:                                                       ┃
     slippage┃                                                                              ┃
     priority┃  ❯ mainnet-beta                                                              ┃
     advanced┃                                                                              ┃
      confirm┃                                                                              ┃
             ┃                                                                              ┃
             ┃                                                                              ┃
             ┃                                                                              ┃
             ┃                                                                              ┃
             ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What looks like an error looks more like a feature, not a bug on a bigger screen, because there is a message hidden outside the bot's main screen, which says: "You are not ARB ready! You need to hold at least 10K in ARB in your trading wallet to use this bot." Oops, let me run down to the supermarket and get some ARB :-). I shall report back later!

@chlarsen
Copy link

I added 14k ARB (token address: 4FKVLyhBAeLEvjZfWPfV4hqWAPkpjn94cRqi3raY3hy9) to my wallet, but the same error reappears, whenever I run 'yarn start':


You are not ARB ready! You need to hold at least 10K in ARB in your trading wallet to use this bot.



ARB PROTOCOL BOT SETUP TESTS

*************************


ARB PROTOCOL BOT SETUP TESTS

*************************


ARB PROTOCOL BOT SETUP TESTS

*************************

You are not ARB ready! You need to hold at least 10K in ARB in your trading wallet to use this bot.


ARB PROTOCOL BOT SETUP TESTS

*************************

You are not ARB ready! You need to hold at least 10K in ARB in your trading wallet to use this bot.

*************************


                                            [ previous             ] next              [H]elp             [ESC]

               ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃  ▄▀█ █▀█ █▄▄    █ █ █ █▀█ █ ▀█▀ █▀▀ █▀█  █▄▄ █▀█ ▀█▀                         ┃
        network┃  █▀█ █▀▄ █▄█  █▄█ █▄█ █▀▀ █  █  ██▄ █▀▄  █▄█ █▄█  █                          ┃
            rpc┃                                                                              ┃
       strategy┃                                                                              ┃
         tokens┃  ──────────────────── network ────────────────────                           ┃
   trading size┃                                                                              ┃
         profit┃ Select Solana Network:                                                       ┃
       slippage┃                                                                              ┃
       priority┃  ❯ mainnet-beta                                                              ┃
       advanced┃                                                                              ┃
        confirm┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Yet, I have 14k ARB in my wallet, plus SOL for gas fees, etc.
Thoughts?

@snurfer0
Copy link

snurfer0 commented Sep 2, 2024

I added 14k ARB (token address: 4FKVLyhBAeLEvjZfWPfV4hqWAPkpjn94cRqi3raY3hy9) to my wallet, but the same error reappears, whenever I run 'yarn start':


You are not ARB ready! You need to hold at least 10K in ARB in your trading wallet to use this bot.



ARB PROTOCOL BOT SETUP TESTS

*************************


ARB PROTOCOL BOT SETUP TESTS

*************************


ARB PROTOCOL BOT SETUP TESTS

*************************

You are not ARB ready! You need to hold at least 10K in ARB in your trading wallet to use this bot.


ARB PROTOCOL BOT SETUP TESTS

*************************

You are not ARB ready! You need to hold at least 10K in ARB in your trading wallet to use this bot.

*************************


                                            [ previous             ] next              [H]elp             [ESC]

               ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃  ▄▀█ █▀█ █▄▄    █ █ █ █▀█ █ ▀█▀ █▀▀ █▀█  █▄▄ █▀█ ▀█▀                         ┃
        network┃  █▀█ █▀▄ █▄█  █▄█ █▄█ █▀▀ █  █  ██▄ █▀▄  █▄█ █▄█  █                          ┃
            rpc┃                                                                              ┃
       strategy┃                                                                              ┃
         tokens┃  ──────────────────── network ────────────────────                           ┃
   trading size┃                                                                              ┃
         profit┃ Select Solana Network:                                                       ┃
       slippage┃                                                                              ┃
       priority┃  ❯ mainnet-beta                                                              ┃
       advanced┃                                                                              ┃
        confirm┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Yet, I have 14k ARB in my wallet, plus SOL for gas fees, etc. Thoughts?

delete line 217-240 from /src/utils/index.js

@chlarsen
Copy link

chlarsen commented Sep 3, 2024

Thank you, the ARB issue has been sorted, the bot configured for a test run with ping pong trade, INF/USDC, 30 BPS slippage to avoid slippage errors for now, but I get:

Error: No routes found for the input and output mints
    at Vn (/home/chris/solana-jupiter-bot/node_modules/@jup-ag/core/dist/core.cjs.production.min.js:1:177824)
    at Yn.computeRoutes (/home/chris/solana-jupiter-bot/node_modules/@jup-ag/core/dist/core.cjs.production.min.js:1:192951)
    at async pingpongStrategy (/home/chris/solana-jupiter-bot/src/bot/index.js:64:18)
    at async watcher (/home/chris/solana-jupiter-bot/src/bot/index.js:452:4)

INF and USDC are recognised by the wizard and selected via TUI dropdown.
Any thoughts?
Thank you!
C.

@Krokodiler24
Copy link

Ich habe 14k ARB (Token-Adresse: 4FKVLyhBAeLEvjZfWPfV4hqWAPkpjn94cRqi3raY3hy9) zu meiner Brieftasche hinzugefügt, aber derselbe Fehler tritt erneut auf, wenn ich „yarn start“ ausführe:


You are not ARB ready! You need to hold at least 10K in ARB in your trading wallet to use this bot.



ARB PROTOCOL BOT SETUP TESTS

*************************


ARB PROTOCOL BOT SETUP TESTS

*************************


ARB PROTOCOL BOT SETUP TESTS

*************************

You are not ARB ready! You need to hold at least 10K in ARB in your trading wallet to use this bot.


ARB PROTOCOL BOT SETUP TESTS

*************************

You are not ARB ready! You need to hold at least 10K in ARB in your trading wallet to use this bot.

*************************


                                            [ previous             ] next              [H]elp             [ESC]

               ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃  ▄▀█ █▀█ █▄▄    █ █ █ █▀█ █ ▀█▀ █▀▀ █▀█  █▄▄ █▀█ ▀█▀                         ┃
        network┃  █▀█ █▀▄ █▄█  █▄█ █▄█ █▀▀ █  █  ██▄ █▀▄  █▄█ █▄█  █                          ┃
            rpc┃                                                                              ┃
       strategy┃                                                                              ┃
         tokens┃  ──────────────────── network ────────────────────                           ┃
   trading size┃                                                                              ┃
         profit┃ Select Solana Network:                                                       ┃
       slippage┃                                                                              ┃
       priority┃  ❯ mainnet-beta                                                              ┃
       advanced┃                                                                              ┃
        confirm┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┃                                                                              ┃
               ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Dennoch habe ich 14.000 ARB in meiner Brieftasche, plus SOL für Gasgebühren usw. Was meint ihr?

Löschen Sie die Zeilen 217-240 aus /src/utils/index.js

@snurfer0
Hello, I have the same problem but you can't delete all of the lines 217 -240 then the export no longer works. Which lines do you have to delete for it to work?? these are the lines 217-240 for me

	return true;
} catch (err){
	console.clear(); // Clear console before displaying message
	displayMessage("You do not seem to be ARB ready!\n\nCheck the .ENV file to see your RPC is set up properly and your wallet is set to the correct private key.");
	process.exit(1);
}

};

module.exports = {
createTempDir,
storeItInTempAsJSON,
createConfigFile,
loadConfigFile,
verifyConfig,
calculateProfit,
toDecimal,
toNumber,
updateIterationsPerMin,
checkRoutesResponse,
checkForEnvFile,
checkArbReady,
checkWallet,
};

@xylodan
Copy link

xylodan commented Oct 11, 2024

Did you ever get it working? I started down this rabbit hole today and hit many of the same brick walls.

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants