[英]node not running , websocket error
Simply replace 'const' by 'var'. 只需将“ const”替换为“ var”即可。 Strict mode forces you to declare your variables explicitely. 严格模式强制您明确声明变量。
Most likely what is happening is that you are executing your script with an older version of node (more specifically V8) that had restrictions on how/where some ES6 features could be used. 最有可能发生的事情是,您正在使用较旧版本的节点(更具体地说是V8)执行脚本,该节点对某些ES6功能的使用方式/位置有所限制。 Upgrading node ( at least to v4.0.0) should fix the problem. 升级节点( 至少升级到v4.0.0)应该可以解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.