[英]Angular 6 to 12 Migration Issues
I am getting below error after i upgraded from Angular 6 to Angular 12我从 Angular 6 升级到 Angular 12 后出现以下错误
styles.css - Error: styles.css from Css Minimizer
Error: [object Object] is not a PostCSS plugin
at Processor.normalize (C:\xxxxx\xxxxx\node_modules\postcss\lib\processor.js:168:15)
Can anyone help me what can be reason for this?谁能帮助我这是什么原因?
Looks like the Processor can't make sense of the Object being passed to it.看起来处理器无法理解传递给它的 Object。 I just recently had something very similar from a migration as well so might suspect some version mismatch.我最近刚从迁移中得到了一些非常相似的东西,所以可能会怀疑某些版本不匹配。 For my case the problem was caused by old package_lock.就我而言,问题是由旧的 package_lock 引起的。
Just the get this out of the way.只是把这个排除在外。 Remove packacge-lock and node_modules rm -rf node_modules package-lock.json
, add compatible postcss and install other packages as well npm install -D postcss && npm install
.删除 packacge-lock 和 node_modules rm -rf node_modules package-lock.json
,添加兼容的 postcss 并安装其他包npm install -D postcss && npm install
You could also go over some migration steps so see if you missed something.您还可以通过一些迁移步骤 go 看看您是否遗漏了什么。 https://update.angular.io/?l=3&v=6.0-12.0 https://update.angular.io/?l=3&v=6.0-12.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.