https://doc.zeroc.com/display/Ice36/Writing+an+Ice+Application+with+JavaScript
只是官方网站示例,当我运行节点Client.js时,
Ice.Promise.try(
^
TypeError: Cannot read property 'Promise' of undefined
at Object.<anonymous> (/home/lanceloft/learn/ice/Client.js:6:4)
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)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
system:ubuntu16.04
答案 0 :(得分:2)
看起来文档中存在错误,blueSecondary
应替换为require("icejs")
。你能试着看看是否能解决你的问题吗?
我们将修复文档!否则,您可以在此处查看JavaScript演示,了解一些起点&gt; https://github.com/zeroc-ice/ice-demos/tree/3.6/js
贝努瓦。