user@host:/var/www/abc/def/frontend# npm run serve
> [email protected] serve /var/www/abc/def/frontend
> vue-cli-service serve
ERROR Invalid options in vue.config.js: "baseUrl" is not allowed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve 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! /root/.npm/_logs/2022-05-23T20_18_30_614Z-debug.log
CodePudding user response:
This is not a coding issue, the problem is that vue ui still adds baseUrl to the vue config file on save, but it has been deprecated and replaced by publicPath.
So because it is deprecated, vue cli will create an error by its own generated file ^^.
This can easily be fixed by changing vue ui to update vue config file by publicPath
instead of baseUrl
.