dappuniversity / price-bot

397 stars 392 forks source link

tried NPM install and got this #14

Open jolt06 opened 3 years ago

jolt06 commented 3 years ago

i tried npm install and did npm start run and this is what i got.

PS C:\Users\jolt0> cd ./price-bot/ PS C:\Users\jolt0\price-bot> npm install npm WARN trading-bot@0.3.0 No repository field.

up to date in 11.754s PS C:\Users\jolt0\price-bot> npm start run

trading-bot@0.3.0 start C:\Users\jolt0\price-bot node index.js "run"

Listening on 5000 Checking prices... Error: Provider not set or invalid at Object.InvalidProvider (C:\Users\jolt0\price-bot\node_modules\web3-core-helpers\src\errors.js:38:16) at RequestManager.send (C:\Users\jolt0\price-bot\node_modules\web3-core-requestmanager\src\index.js:128:32) at sendRequest (C:\Users\jolt0\price-bot\node_modules\web3-core-method\src\index.js:560:42) at send (C:\Users\jolt0\price-bot\node_modules\web3-core-method\src\index.js:581:13) at Object._executeMethod (C:\Users\jolt0\price-bot\node_modules\web3-eth-contract\src\index.js:826:24) at checkPair (C:\Users\jolt0\price-bot\index.js:36:96) at monitorPrice (C:\Users\jolt0\price-bot\index.js:68:11) at Timeout.setInterval [as _onTimeout] (C:\Users\jolt0\price-bot\index.js:112:48) at ontimeout (timers.js:466:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:267:5)

pgem720 commented 3 years ago

@jolt06 were you able to figure this out? I'm having the same issue.

jordanmcdougall commented 3 years ago

Make sure you have a valid RPC URL in the .env file. I just commented out this line in my code and was able to generate the same error msg. If you have done that did you also remove the .example from the end of the file?

stahe86 commented 3 years ago

Make sure you have a valid RPC URL in the .env file. I just commented out this line in my code and was able to generate the same error msg. If you have done that did you also remove the .example from the end of the file?

I have this same issue. My RPC_URL should be good, although I;m not sure if the https://mainnet link after RPC_URL is supposed to be contained within "" or without the "". That's the only problem I can think of, but then again I know little to nothing about this stuff.

ccoop1 commented 2 years ago

Did you guys ever get this figured out?

ccoop1 commented 2 years ago

I got it figured out between yesterday and today. Too many issues to list that I had to fix - if you guys have any trouble message me! I had to go through all this same stuff lol

ccoop1 commented 2 years ago

What fixed this issue for me was to delete the whole thing at the directory and restart. For some reason the first time it just would not take my infura info. Took it just fine upon removing the directories and starting fresh. No clue why though sorry. I also has quite a few issues I encountered before this one sprang - and then several afterwards. It does work still though and can be fixed. You will also need to update kyber after this - some hero already has that in for a pull request on here!