#7468·vue-cli

打包报错

Author: tr-textCreated Dec 3, 2024Updated Nov 2, 2025

Version

5.0.8

Reproduction link

cli.vuejs.org

Environment info

docker 打包时总是停在INFO  Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html,不在往下走。
在vue.config.js中加上publicPath之后,会报错
  Invalid options in vue.config.js: "publicPath" is not allowed

Steps to reproduce

RUN npm run build 4522.3s => => # dist/css/chunk-04a0ad48.7f5d345c.css 0.07 kb 0.08 kb
=> => # dist/css/chunk-4a779d88.0b833884.css 0.00 kb 0.02 kb
=> => # Images and other types of assets omitted.
=> => # DONE Build complete. The dist directory is ready to be deployed.
=> => # INFO Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html

What is expected?

docker build 成功

What is actually happening?

docke打包时,执行到npm run build报错


RUN npm run build 4522.3s => => # dist/css/chunk-04a0ad48.7f5d345c.css 0.07 kb 0.08 kb
=> => # dist/css/chunk-4a779d88.0b833884.css 0.00 kb 0.02 kb
=> => # Images and other types of assets omitted.
=> => # DONE Build complete. The dist directory is ready to be deployed.
=> => # INFO Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html