vue3 启动项目 Network: unavailable
再 vue.config.js
改成:
module.exports = {
transpileDependencies: true,
public: '0.0.0.0:8080',
}
然后再启动项目就:
> vue_shop@0.1.0 serve C:\Vue\webroot\weishangcheng\vue_shop
> vue-cli-service serve
ERROR Invalid options in vue.config.js: "public" is not allowed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue_shop@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue_shop@0.1.0 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! C:\Users\夕阳\AppData\Roaming\npm-cache\_logs\2023-06-06T15_05_07_388Z-debug.log