Ekliptor / WolfBot

Crypto currency trading bot written in TypeScript for NodeJS
https://wolfbot.org
GNU Affero General Public License v3.0
703 stars 213 forks source link

Cannot run on fresh install #18

Closed mstofflett closed 5 years ago

mstofflett commented 5 years ago

Install seems to go OK.

Versions are: CentOS 7 NodeJS 10 (Installed via NVM) Yarn 1.16.0 (Installed Via [curl -o- -L https://yarnpkg.com/install.sh | bash]) typescript 3.4.5

Try running: node app.js --debug --config=Noop --trader=RealTimeTrader --noUpdate --noBrowser

Error: Cannot find module 'deribit-v2-ws' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/WolfBot/WolfBot/src/Exchanges/Deribit.ts:35:1) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/WolfBot/WolfBot/src/Exchanges/AbstractExchange.ts:899:1) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/WolfBot/WolfBot/src/ExchangeController.ts:5:1) at Module._compile (internal/modules/cjs/loader.js:701:30)

Ekliptor commented 5 years ago

the dependency was indeed missing. please try running yarn install again with the latest package.json

mstofflett commented 5 years ago

New error after rebuild:

Error: Cannot find module './Crawler/AbstractCrawler' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/WolfBot/WolfBot/src/Social/SocialController.ts:13:58) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/WolfBot/WolfBot/src/WebSocket/ConfigEditor.ts:19:1) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/WolfBot/WolfBot/src/ExchangeController.ts:7:1) at Module._compile (internal/modules/cjs/loader.js:701:30)

Ekliptor commented 5 years ago

at Object. (/home/WolfBot/WolfBot/src/Social/SocialController.ts:13:58) You are not using the --noBrowser argument or else the file would not be included in this line

mstofflett commented 5 years ago

Got it, thanks for that one.

Got it running but cant access the Web UI without an API Key. I set the configLocal.ts to false as well as deleted the API key from the file all together. Still no luck

Error: Unauthorized You are not authorized to access this application. Please contact the administrator for an API-Key.

Ekliptor commented 5 years ago

it will display a URL to your bot with the API key in the log. also you shouldn't delete it from config, just set it to true and a random string.

mstofflett commented 5 years ago

I set it to true with a random string like you said. configLocal.js "apiKeys": { "abcde12345": true // set to false to disable a key },

Here what i Get, Same error as before and this in the console:

2019-05-19 17:16:29 - warn: Refusing WebSocket connection without authentication on / from ::ffff:192.168.1.143

The only reference to the BOT url is when it first starts: 2019-05-19 17:16:20 - info: Server is listening on http://antlet13:8331/index.html 2019-05-19 17:16:20 - info: Server is listening on https://antlet13:8332/index.html

What are your thoughts on this

Ekliptor commented 5 years ago

There is no API key enabled on your bot. Probably it is disabled in config.json (which overrides the configLocal.js). I made a commit to always show the API key /index.html?apiKey=YOUR_API_KEY_FROM_CONFIG

Try deleting the config.json and use your key from .js

Lamonz88 commented 5 years ago

Install seems to go OK.

Versions are: CentOS 7 NodeJS 10 (Installed via NVM) Yarn 1.16.0 (Installed Via [curl -o- -L https://yarnpkg.com/install.sh | bash]) typescript 3.4.5

Try running: node app.js --debug --config=Noop --trader=RealTimeTrader --noUpdate --noBrowser

Error: Cannot find module 'deribit-v2-ws' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/WolfBot/WolfBot/src/Exchanges/Deribit.ts:35:1) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/WolfBot/WolfBot/src/Exchanges/AbstractExchange.ts:899:1) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/home/WolfBot/WolfBot/src/ExchangeController.ts:5:1) at Module._compile (internal/modules/cjs/loader.js:701:30)

Hi . I am trying to install this bot on a windows machine . Did you install MongoDb to get the UI working ?