ERROR Invalid options in vue.config.js: "publicPath" is not allowed
程序员文章站
2022-07-14 23:45:41
...
刚从远程clone下来的代码,npm run dev
后报错,报错信息如下:
ERROR Invalid options in vue.config.js: "publicPath" is not allowed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! aaa@qq.com dev: `vue-cli-service serve --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the aaa@qq.com dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/thinker/.npm/_logs/2019-10-11T03_32_39_690Z-debug.log
解决方式:
具体原因是因为版本支持的问题,publicPath 属性到 vue-cli 3.2.0 之后才支持,所以将 publicPath 改成 baseUrl 即可,或者升级你的 vue-cli 。
修改前:
修改后:
上一篇: S2SH整合以及图片上传(5)之struts2的搭建
下一篇: S2SH框架搭建—基于XML配置
推荐阅读
-
Invalid options in vue.config.js: "publicPath" is not allowed
-
ERROR Invalid options in vue.config.js: "publicPath" is not allowed
-
Invalid options in vue.config.js: "baseUrl" is not allowed
-
ERROR Invalid options in vue.config.js: "baseUrl" is not allowed
-
ERROR Invalid options in vue.config.js: "baseUrl" is not allowed
-
Invalid options in vue.config.js: "publicPath" is not allowed