前端项目在本地测试的时候使用npm run serve没有任何问题,而使用npm run 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. (E:\Learning\admin\node_modules\mini-css-extract-plugin\dist\CssDependency.js:12:46) at Module._compile (internal/modules/cjs/loader.js:1072:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) at Module.load (internal/modules/cjs/loader.js:937:32) at Function.Module._load (internal/modules/cjs/loader.js:778:12) at Module.require (internal/modules/cjs/loader.js:961:19) at require (internal/modules/cjs/helpers.js:92:18) at Object. (E:\Learning\admin\node_modules\mini-css-extract-plugin\dist\index.js:12:45) at Module._compile (internal/modules/cjs/loader.js:1072:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) at Module.load (internal/modules/cjs/loader.js:937:32) at Function.Module._load (internal/modules/cjs/loader.js:778:12) at Module.require (internal/modules/cjs/loader.js:961:19) at require (internal/modules/cjs/helpers.js:92:18) at Object. (E:\Learning\admin\node_modules\mini-css-extract-plugin\dist\cjs.js:3:18) at Module._compile (internal/modules/cjs/loader.js:1072:14) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! vue-antd-admin@0.7.4 build: vue-cli-service build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the vue-antd-admin@0.7.4 build 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! D:\Program Files\nodejs\node_cache_logs\2025-02-14T02_22_11_682Z-debug.log