我试着学习如何编写一个“我的世界”机器人,我发现了Mineflayer。一切都运行得很好,但当我运行程序时,我总是得到:
/home/runner/Minecraft-Bot/node_modules/mineflayer/index.js:63
options.username = options.username ?? 'Player'
^
SyntaxError: Unexpected token '?'
The error message I am getting
我使用了Mineflayer的GitHub页面,并逐字跟踪,但我的代码仍然无法运行。你知道为什么会这样吗?谢谢!My code
发布于 2021-03-25 05:24:36
基于堆栈跟踪中的代码行: Node.js无法解释??
语法构造。"??“被称为nullish合并运算符,并且是ECMAScript的新添加,因此它只在最近的运行时中受支持。确保您运行的是Node.js 14.x或更高版本。
https://stackoverflow.com/questions/66789095
复制相似问题