zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

Error: Cannot find module './build/Release/analytics.node'

Open jasurakk opened this issue 9 years ago • 9 comments

I just installed Zenbot on my new Ubuntu 16.04 VM, but what ever I do, I just get errors such as:

xxxx@Ubuntu-16:~/zenbot$ zenbot list-selectors module.js:471 throw err; ^ Error: Cannot find module './build/Release/analytics.node' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/xxxx/zenbot/node_modules/forex.analytics/index.js:1:79) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)

xxxx@Ubuntu-16:~/zenbot$ zenbot sim --help module.js:471 throw err; ^ Error: Cannot find module './build/Release/analytics.node' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/xxxx/zenbot/node_modules/forex.analytics/index.js:1:79) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)

What's wrong with this?? :-o

jasurakk avatar Oct 18 '17 18:10 jasurakk

Hey. At me something similar.

server_1 | Error: Cannot find module './conf-sample' server_1 | at Function.Module._resolveFilename (module.js:527:15) server_1 | at Function.Module._load (module.js:476:23) server_1 | at Module.require (module.js:568:17) server_1 | at require (internal/module.js:11:18) server_1 | at module.exports (/app/boot.js:12:18) server_1 | at Object. (/app/zenbot.js:20:1) server_1 | at Module._compile (module.js:624:30) server_1 | at Object.Module._extensions..js (module.js:635:10) server_1 | at Module.load (module.js:545:32) server_1 | at tryModuleLoad (module.js:508:12) server_1 | module.js:529 server_1 | throw err; server_1 | ^ server_1 |

node -v v4.2.6 npm -v v3.5.2

zemelax avatar Oct 18 '17 21:10 zemelax

Duplicated: see #432 (already solved) "Guys, please upgrade to nodejs 8, that should solve the build problem. Please make sure to rm -rf node_modules && npm install to reinstall everything."

estebarb avatar Oct 19 '17 03:10 estebarb

node -v v8.7.0 npm -v v5.4.2 the error is repeated

zemelax avatar Oct 19 '17 10:10 zemelax

Ok, I too installed the newer node.js, same versions that zemelax just listed. Now when I do "npm install", I get the following:

xxxx@Ubuntu-16:~/zenbot/zenbot$ sudo npm install npm ERR! code 1 npm ERR! Command failed: /usr/bin/git clone -q git://github.com/mkmarek/forex.analytics.git /home/xxxx/.npm/_cacache/tmp/git-clone-a1afc987 npm ERR! /home/xxxx/.npm/_cacache/tmp/git-clone-a1afc987/.git: Permission denied npm ERR!

npm ERR! A complete log of this run can be found in: npm ERR! /home/xxxx/.npm/_logs/2017-10-19T18_36_32_331Z-debug.log

Tried to Google all around about that, did not get any hits, can someone help?

jasurakk avatar Oct 19 '17 18:10 jasurakk

I tried with "yarn" (do a npm install yarn before) instead of "npm install" and it finally worked. Also, had to remove the previous zenbot instance. But yes, the installation could be improved (avoiding sudo npm would be great). Also, yesterday Github had some issues (I wasn't able to clone using git, just with https...) https://status.github.com/messages .

estebarb avatar Oct 20 '17 03:10 estebarb

[email protected] install /home/masternode/Documents/zenbot/zenbot/node_modules/talib node ./src/lib/build.js && node-gyp configure && node-gyp build

building talib functions... gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/masternode/Documents/zenbot/node_modules/forex.analytics/build' gyp ERR! System Linux 4.10.0-37-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" gyp ERR! cwd /home/masternode/Documents/zenbot/node_modules/forex.analytics gyp ERR! node -v v8.7.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: node-gyp configure && node-gyp build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/masternode/.npm/_logs/2017-10-21T00_52_40_441Z-debug.log

got this too node version 8.7, npm version 5.5.1 running VM Ubuntu 16.0.4 I did everything in #432

ghost avatar Oct 21 '17 00:10 ghost

Ubuntu 16.04 Tested

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install build-essential mongodb

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

git clone https://github.com/carlos8f/zenbot.git
cd zenbot
npm install

./zenbot.sh trade --paper

sniper7kills avatar Oct 21 '17 01:10 sniper7kills

Sniper7kills, I don't know why, but when I copy-pasted your lines on my Ubuntu, it just started working! \o/

I surely did try all those command previously also, but it might be that used "sudo" in front of curl-, git- and npm install- commands also..? I'm not sure though, and don't know if would matter anyway?

Thank you, you´re the best! :=)

jasurakk avatar Oct 22 '17 15:10 jasurakk

@jasurakk Glad to hear, it was probably the lack of the build-essentials being installed; just an fyi don't use sudo if you don't need to (I.E. Curl, Git, npm install), it runs commands as root which can cause you major issues if your not careful.

If this solved your issue you might want to close it ;)

sniper7kills avatar Oct 22 '17 16:10 sniper7kills