dappuniversity / price-bot

397 stars 392 forks source link

Error: Provider not set or invalid #2

Closed grazcata closed 3 years ago

grazcata commented 3 years ago

Hi, i got this error, how to fix it ?

maurice@DESKTOP-K0CAPB1:~/price-bot$ npm run start

> trading-bot@0.3.0 start /home/maurice/price-bot
> node index.js

Listening on 5000
Checking prices...
Error: Provider not set or invalid
    at Object.InvalidProvider (/home/maurice/price-bot/node_modules/web3-core-helpers/src/errors.js:41:16)
    at RequestManager.send (/home/maurice/price-bot/node_modules/web3-core-requestmanager/src/index.js:157:32)
    at sendRequest (/home/maurice/price-bot/node_modules/web3-core-method/src/index.js:763:42)
    at send (/home/maurice/price-bot/node_modules/web3-core-method/src/index.js:797:13)
    at Object._executeMethod (/home/maurice/price-bot/node_modules/web3-eth-contract/src/index.js:945:20)
    at checkPair (/home/maurice/price-bot/index.js:36:96)
    at monitorPrice (/home/maurice/price-bot/index.js:68:11)
    at Timeout.setInterval [as _onTimeout] (/home/maurice/price-bot/index.js:112:48)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
grazcata commented 3 years ago

Working ok now with Windows :)