在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ npm run build 報錯

npm run build 報錯

求大神幫忙解答這個問題的原因和辦法,感謝!

ERROR in ./core/page_models/index.js
Module parse failed: /Library/WebServer/Documents/wxlite/node_modules/babel-loader/lib/index.js?{"presets":["es2015"],"plugins":[["transform-runtime"]]}!/Library/WebServer/Documents/wxlite/core/page_models/index.js Unexpected token (109:21)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (109:21)

at Parser.pp$4.raise (/Library/WebServer/Documents/wxlite/node_modules/acorn/dist/acorn.js:2221:15)
at Parser.pp.unexpected (/Library/WebServer/Documents/wxlite/node_modules/acorn/dist/acorn.js:603:10)
at Parser.pp.expect (/Library/WebServer/Documents/wxlite/node_modules/acorn/dist/acorn.js:597:28)
at Parser.pp$3.parseObj (/Library/WebServer/Documents/wxlite/node_modules/acorn/dist/acorn.js:1973:16)
at Parser.pp$3.parseExprAtom (/Library/WebServer/Documents/wxlite/node_modules/acorn/dist/acorn.js:1805:19)
at Parser.pp$3.parseExprSubscripts (/Library/WebServer/Documents/wxlite/node_modules/acorn/dist/acorn.js:1715:21)

回答
編輯回答
青檸

你的node版本是多少?嘗試刪掉node_modules重新install,再試一下

2017年9月17日 19:26
編輯回答
玩控

重新clone項目代碼后,安裝了cnpm,使用 cnpm run build 竟然成功了!
估計是之前使用 npm 安裝依賴時缺失了什么東西

2018年2月14日 10:41