【发布时间】:2020-05-15 18:12:40
【问题描述】:
我一直在尝试运行 vue-electron 应用程序。但是出现以下错误。
App threw an error during load
C:\newFolder02\pos4-desktop\node_modules\@serialport\stream\lib\index.js:103
const settings = { ...defaultSettings, ...options }
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\newFolder02\pos4-desktop\node_modules\serialport\lib\index.js:1:175)
错误来自以下行。
const settings = { ...defaultSettings, ...options }
我使用以下工具
- 节点 8.16.0
- npm 6.4.1
- 电子 1.8.2
它在 Windows 中不起作用。但它适用于 Mac OS。 任何想法..?
【问题讨论】:
-
您的节点环境不支持应该已经包含在节点 8.16 中的 ES6 语法
-
@fodma1 是的。是真的。该软件的开发始于一年多前。升级到最新版本是最好的解决方案。
标签: node.js vue.js electron node-serialport electron-vue