【问题标题】:Node.js SteamBot not workingNode.js SteamBot 不工作
【发布时间】:2017-05-31 18:37:07
【问题描述】:

我的 Node.js Steam-Bot 不工作。当我尝试启动他时,它总是给出一个语法错误:

/root/bot/node_modules/steam-tradeoffer-manager/lib/index.js:3
const SteamCommunity = require('steamcommunity');
^^^^^
SyntaxError: Use of const in strict mode.
    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> (/root/bot/tradebot.js:20:25)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

我使用的是 Debian 8,节点版本 0.12。

谢谢!

【问题讨论】:

标签: node.js bots steam


【解决方案1】:

错误说明了一切。将const 替换为var。 此外,您应该更新您的 nodeJS 版本,如 cmets 中所述。这真的很重要。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-02
    • 2018-12-23
    • 1970-01-01
    • 1970-01-01
    • 2012-07-17
    • 2015-10-15
    • 1970-01-01
    相关资源
    最近更新 更多