npm 运行 提供意外的令牌 ...选项
npm run serve unexpected token ...options
我正在尝试运行 IBM 区块链选举系统,Evote。 link=https://github.com/IBM/evote。
当我尝试使用 "npm run serve" 访问 运行 客户端时。我收到以下错误。
ahmed@ahmed-Inspiron-3580:~/evote/web-app/client$ npm run serve
> client@0.1.0 serve /home/ahmed/evote/web-app/client
> vue-cli-service serve
/home/ahmed/evote/web-app/client/node_modules/open/index.js:29
...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> (/home/ahmed/evote/web-app/client/node_modules/@vue/cli-shared-utils/lib/openBrowser.js:9:14)
您可能使用的 node.js 版本很旧。您可以通过
检查版本
node -v
您需要使用节点 8(它可能不适用于高于该版本的任何版本)。
我建议使用 nvm
作为管理节点版本的机制。参见 https://github.com/nvm-sh/nvm
我正在尝试运行 IBM 区块链选举系统,Evote。 link=https://github.com/IBM/evote。 当我尝试使用 "npm run serve" 访问 运行 客户端时。我收到以下错误。
ahmed@ahmed-Inspiron-3580:~/evote/web-app/client$ npm run serve
> client@0.1.0 serve /home/ahmed/evote/web-app/client
> vue-cli-service serve
/home/ahmed/evote/web-app/client/node_modules/open/index.js:29
...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> (/home/ahmed/evote/web-app/client/node_modules/@vue/cli-shared-utils/lib/openBrowser.js:9:14)
您可能使用的 node.js 版本很旧。您可以通过
检查版本node -v
您需要使用节点 8(它可能不适用于高于该版本的任何版本)。
我建议使用 nvm
作为管理节点版本的机制。参见 https://github.com/nvm-sh/nvm