1. The problem is as the title says. After deploying the vue project, everything goes fine when npm run dev is executed, but an error keeps reporting after npm run build is executed.
2. My Alibaba Cloud The operating system is ubuntu and the node version is 6.1.0
3. After searching online, it seems that the nodejs6 version does not support import, but why does nodejs on my local computer not report an error?
4. Please give us your suggestions, thank you all!
高洛峰2017-06-20 10:08:58
node6 does not support import syntax, solution:
1. Change import to require
2. Update node to 8.0
怪我咯2017-06-20 10:08:58
I have encountered a similar problem. I have no problem packaging with mac, but there is a problem with window packaging. I suspect it is a problem with the npm version, because the node version of mac is the same as the node version of window, but npm is different. Mac is 3.xxx, window is 4.xx
某草草2017-06-20 10:08:58
node6 does not support import syntax. You should post package.json and part of the code