Vue-cli: Invalid options in vue.config.js: "publicPath" is not allowed

Created on 17 Jan 2019  Â·  2Comments  Â·  Source: vuejs/vue-cli

Version

3.3.0

Environment info

  System:
    OS: macOS 10.14.2
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  Binaries:
    Node: 10.6.0 - /usr/local/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: Not Found
  Browsers:
    Chrome: 71.0.3578.98
    Firefox: 64.0.2
    Safari: 12.0.2
  npmPackages:
    @vue/babel-preset-app:  3.2.0 
    @vue/cli-overlay:  3.2.0 
    @vue/cli-plugin-babel: ^3.0.4 => 3.2.0 
    @vue/cli-plugin-eslint: ^3.0.4 => 3.2.1 
    @vue/cli-service: ^3.0.4 => 3.2.0 
    @vue/cli-shared-utils:  3.2.0 
    @vue/component-compiler-utils:  2.3.1 
    @vue/preload-webpack-plugin:  1.1.0 
    @vue/web-component-wrapper:  1.2.0 
    babel-helper-vue-jsx-merge-props:  2.0.3 
    babel-plugin-transform-vue-jsx:  4.0.1 
    eslint-plugin-vue: ^5.0.0-0 => 5.0.0 
    vue: ^2.5.17 => 2.5.21 
    vue-axios: ^2.1.4 => 2.1.4 
    vue-cli-plugin-element: ^1.0.0 => 1.0.0 
    vue-eslint-parser:  2.0.3 
    vue-hot-reload-api:  2.3.1 
    vue-loader:  15.4.2 
    vue-router: ^3.0.1 => 3.0.2 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.5.17 => 2.5.21 
    vue-template-es2015-compiler:  1.6.0 
    vuex: ^3.0.1 => 3.0.1 
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

update " Vue CLI " => general setting "PublicPath" 's default value,then build error

What is expected?

according to the recommended configuration on the official website, I modified the value of publicPath ,

What is actually happening?

After modification, the compiler reported the following error。
error:Invalid options in vue.config.js: "publicPath" is not allowed

Most helpful comment

publicPath is a new opton in Vue CLI v3.3.
And you are still using v3.2.0

@vue/cli-service: ^3.0.4 => 3.2.0

All 2 comments

publicPath is a new opton in Vue CLI v3.3.
And you are still using v3.2.0

@vue/cli-service: ^3.0.4 => 3.2.0

how I fixed it:

npm install -g yarn
yarn install

It works for me now. Hope it can help you solve your problem. -:)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PrimozRome picture PrimozRome  Â·  3Comments

b-zee picture b-zee  Â·  3Comments

Gonzalo2683 picture Gonzalo2683  Â·  3Comments

Akryum picture Akryum  Â·  3Comments

BusyHe picture BusyHe  Â·  3Comments