builder-247 / node-autotip

Commandline-based autotip client for Hypixel using mineflayer
MIT License
20 stars 6 forks source link

TypeError: logger.error is not a function #4

Closed hashdashme closed 5 years ago

hashdashme commented 5 years ago

Hi, I'm currently trying to run the script, but I got an error instead...


> node-autotip@1.0.1 start /home/pi/minecraft/node-autotip
> node index

[7:06:22 PM] [INFO] Logged on mc.hypixel.net:25565
/home/pi/minecraft/node-autotip/lib/writer.js:34
      logger.error(err);
             ^

TypeError: logger.error is not a function
    at fs.writeFile (/home/pi/minecraft/node-autotip/lib/writer.js:34:14)
    at fs.open (fs.js:1169:7)
    at FSReqWrap.args [as oncomplete] (fs.js:140:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-autotip@1.0.1 start: `node index`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-autotip@1.0.1 start 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/pi/.npm/_logs/2019-05-06T11_06_23_025Z-debug.log

I'm running this on a raspberry pi if that helps... Thanks in Advance!

hashdashme commented 5 years ago

Here is the complete log...

0 info it worked if it ends with ok
1 verbose cli [ '/home/pi/.nvm/versions/node/v10.15.3/bin/node',
1 verbose cli   '/home/pi/.nvm/versions/node/v10.15.3/bin/npm',
1 verbose cli   'start' ]
2 info using npm@6.4.1
3 info using node@v10.15.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle node-autotip@1.0.1~prestart: node-autotip@1.0.1
6 info lifecycle node-autotip@1.0.1~start: node-autotip@1.0.1
7 verbose lifecycle node-autotip@1.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle node-autotip@1.0.1~start: PATH: /home/pi/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/minecraft/node-autotip/node_modules/.bin:/home/pi/.nvm/versions/node/v10.15.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle node-autotip@1.0.1~start: CWD: /home/pi/minecraft/node-autotip
10 silly lifecycle node-autotip@1.0.1~start: Args: [ '-c', 'node index' ]
11 silly lifecycle node-autotip@1.0.1~start: Returned: code: 1  signal: null
12 info lifecycle node-autotip@1.0.1~start: Failed to exec start script
13 verbose stack Error: node-autotip@1.0.1 start: `node index`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/home/pi/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:189:13)
13 verbose stack     at ChildProcess.<anonymous> (/home/pi/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:189:13)
13 verbose stack     at maybeClose (internal/child_process.js:970:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid node-autotip@1.0.1
15 verbose cwd /home/pi/minecraft/node-autotip
16 verbose Linux 4.19.37-v7+
17 verbose argv "/home/pi/.nvm/versions/node/v10.15.3/bin/node" "/home/pi/.nvm/versions/node/v10.15.3/bin/npm" "start"
18 verbose node v10.15.3
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error node-autotip@1.0.1 start: `node index`
22 error Exit status 1
23 error Failed at the node-autotip@1.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
builder-247 commented 5 years ago

Yeah the logging doesn't work at the moment for linux systems, I will need to rework it. In the meanwhile if you comment out the erroring line it should work fine as a temporary fix.

builder-247 commented 5 years ago

Fixed in https://github.com/builder-247/node-autotip/commit/efac29dd9a1046f0c5ea3210a076e445171e1ddc