TypeError: Class extends value undefined is not a constructor or null
基于JeecgBoot做二次开发,正式环境打包时遇到的问题记录。
·
JeecgBoot是一个不错的低代码平台,使用的版本是2.4.6。
打包正式版本命令如下:
npm run build:production
但是失败了,非production可以打包成功,但是环境变量解析不到,报错如下:
> ddjx@1.0.7 build:prod
> vue-cli-service build --mode production
⠋ 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> (/Users/xxxxxx/Desktop/Projects/jeecg-boot v2.4.6/ant-design-vue-jeecg/node_modules/mini-css-extract-plugin/dist/CssDependency.js:12:46)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/xxxxxx/Desktop/Projects/jeecg-boot v2.4.6/ant-design-vue-jeecg/node_modules/mini-css-extract-plugin/dist/index.js:12:45)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/xxxxxx/Desktop/Projects/jeecg-boot v2.4.6/ant-design-vue-jeecg/node_modules/mini-css-extract-plugin/dist/cjs.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
解决办法如下:
npm add webpack@4.4.1
更多推荐
已为社区贡献1条内容
所有评论(0)