webStrom用npm run build打包的时候报错:

ERROR Error: CSS minification error: Unknown browser kaios. File: assets/css/app.582b07ad.css
Error: CSS minification error: Unknown browser kaios. File: assets/css/app.582b07ad.css
在这里插入图片描述

解决办法:

方法一:
1、npm install 重新安装
2、去node_modules 下,删除caniuse-lite 和browserslist两个文件夹,记住这个文件夹,
这样在重新npm run build打包下,如果出下面错误,有可能是端口号被占用了,端口问题解决如果还不行,就用方法二:


 ERROR  Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iview-admin@2.0.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iview-admin@2.0.0 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_global\_logs\2020-04-28T08_16_47_844Z-debug.log

方法二:
1、npm install 重新安装
2、对依赖进行一下全局的更新: npm update。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐