npm打包报错TypeError: Class extends value undefined is not a constructor or null

Solution:

upgrade webpack version

The second one I use! The first one I've seen others use. But I still haven't solved it with the first method, and then I can use the second method!

The first is to install this plugin:

npm install --save-dev mini-css-extract-plugin //在项目开发依赖中安装

The second is to upgrade the webpack version (if invalid, you can uninstall it first, then install it):

npm install webpack -g // 全局安装
npm install webpack --save-dev //在项目开发依赖中安装



 

material:

Error TypeError: Class extends value undefined is not a constructor or null - Jianshu encountered an error when executing npm run build: TypeError: Class extends value undefined is not a constructor ... https://www.jianshu.com/ p/85674df7490e

Guess you like

Origin blog.csdn.net/qq_22182989/article/details/122981857