Kapec
By:
Kapec

/home/bot node bot.js error

July 2, 2017 857 views
Node.js Apache IPv6 MySQL

hello frist i instal node site.js work perfeclty : [2017-07-02 13:55:20.773] [INFO] [default] - DB Connection ID: 288
[2017-07-02 13:55:20.784] [INFO] [default] - DB Connection ID: 289
[2017-07-02 13:55:20.786] [INFO] [default] - DB Connection ID: 290
[2017-07-02 13:55:20.788] [INFO] [default] - DB Connection ID: 291
[2017-07-02 13:55:20.793] [TRACE] [default] - Roll 4130
[2017-07-02 13:55:20.796] [TRACE] [default] - Sucesfully updated history
[2017-07-02 13:55:20.796] [WARN] [default] - Loaded hashd8b710dfa2c8a3d990ca1dc7cc0a91754ac20aa6139fb7f6d44b58ee31ece8dc
[2017-07-02 13:55:21.773] [TRACE] [default] - New prices loaded
[2017-07-02 13:55:25.924] [INFO] [default] - DB Connection ID: 288

But when i try node bot.js 1 or 0 i got this error
/home/bot/nodemodules/steam-totp/index.js:22
exports.getTimeOffset((err, offset, latency) => {
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module.
compile (module.js:443:25)
at Object.Module.extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module.
load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/bot/bot.js:2:17)
at Module.compile (module.js:460:26)
at Object.Module.
extensions..js (module.js:478:10)

can somebody help me ? Thanks

4 Answers

Hi @Kapec

Are you running Node.js version 6.0.0 or newer? If not, then upgrade:
https://github.com/DoctorMcKay/node-steam-totp

As it says: "SyntaxError: Unexpected token => in /home/bot/nodemodules/steam-totp/index.js:22"

@hansen @Woet im upgrade node.js and again Error: Cannot find module 'express'
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.<anonymous> (/home/bot/bot.js:26:15)
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)
root@CSGOFARMROULETTE:/home/bot#

  • Its workinjg thanks :)

  • @Kapec
    Did you shutdown and remove the old Node.js before installing version 6 ?
    Otherwise, that's probably the reason for the issue or maybe one of your other modules is not compatible with newer versions of Node.js ?

@hansen @Woet And how to on server node site.js forever or but when i off putty server lost connection ? :/

Have another answer? Share your knowledge.