“node-sass"用法已弃用,将在未来的主要版本中删除 [英] 'node-sass' usage is deprecated and will be removed in a future major version

查看:344
本文介绍了“node-sass"用法已弃用,将在未来的主要版本中删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从 Angular 8 升级到 11 时,我遇到了这个警告

When I upgraded from Angular 8 to 11 I faced this warning

'node-sass' 用法已被弃用,并将在未来的主要版本中删除.要选择退出已弃用的行为并开始使用sass",请卸载node-sass".

'node-sass' usage is deprecated and will be removed in a future major version. To opt-out of the deprecated behavior and start using 'sass' uninstall 'node-sass'.

谁能帮帮我
提前致谢

can anyone help me
Thanks in advance

推荐答案

完整的错误信息是

'node-sass' 用法已弃用,将在未来的主要版本中删除.要选择退出已弃用的行为并开始使用sass",请卸载node-sass".

所以,我认为您可以尝试的唯一解决方案是显而易见的,只需卸载 node-sass.

So, I think the only solution that you can try is obvious, just uninstall node-sass.

=>我已经卸载了它并尝试了 ng serveng build --prod 一切正常.

=> I already uninstalled it and tried ng serve and ng build --prod all is working fine.

仅供参考,作为开发人员,我总是发现这个库 node-sass 由于其不兼容错误而令人头疼.我很高兴我们不必再使用它并处理其痛苦的错误.

FYI, I as a developer always have found this library node-sass as a pain in the head because of its incompatibility errors. I am happy that we don't have to use it and deal with its painful errors anymore.

这篇关于“node-sass"用法已弃用,将在未来的主要版本中删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆