阅读:9633回复:2
打包报错 TypeError: Class extends value undefined is not a constructor or null
$ vue-cli-service build
⠋ Building for production... ERROR TypeError: Class extends value undefined is not a constructor or null TypeError: Class extends value undefined is not a constructor or null at Object.<anonymous> (/root/deploy/ui/node_modules/mini-css-extract-plugin/dist/CssDependency.js:12:46) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (/root/deploy/ui/node_modules/mini-css-extract-plugin/dist/index.js:12:45) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) ———————————————— 先卸载 webpack npm uninstall webpack 然后(直接带版本号安装4.1以上的就行了): npm install webpack -g // 全局安装 npm install webpack --save-dev // 项目内安装 或者 npm add webpack@latest --registry=https://registry.npm.taobao.org 其实只要 : npm install mini-css-extract-plugin 就好了 |
|
沙发#
发布于:2021-07-23 09:19
|
|
板凳#
发布于:2021-07-23 09:36
只要 : npm install mini-css-extract-plugin 就好了
|
|