Vue cli build 遇到的问题
使用vue-cli 3打包时,出现了问题:
1 | vue-cli-service build --mode dev |
可是在本地打包时却没有发现这个问题,在运维脚本打包的服务器上却出现了,然后在github的某个库的issue上找到了答案:
Nice write up @pm-radu, also seeing this issue here.
It appears the two options for resolving it are to modify the project’s
package.json
on line 48 to specify a version of Node.js greater than 7.6 when support was added forasync/await
. Additionally the dependencyopn
is now calledopen
and should be updated.Alternately if maintaining support for the oldest versions of Node is a priority, line 24 could be modified to specify the last
opn
version withoutasync/await
which is 5.4.0.
服务器node版本是6,而async/await语法需node > 7.6,所以报错了。