当我从8升级到11时,我遇到了这样的警告
‘node’的使用是不推荐的,并将在未来的主要版本中删除。若要选择退出不推荐的行为,请开始使用“sass”卸载“node”。
有人能帮我吗
提前感谢
发布于 2021-02-03 00:09:55
完整的错误消息是
'node-sass' usage is deprecated and will be removed in a future major version. To opt-out of the deprecated behaviour and start using 'sass' uninstall 'node-sass'.
因此,我认为您可以尝试的唯一解决方案是显而易见的,只需卸载节点-sass。
=> --我已经卸载了它,尝试了ng serve
和ng build --prod
--一切都很好。
FYI,我作为一个开发人员总是发现这个库node-sass
是一个痛苦的问题,因为它不兼容错误。我很高兴我们不用再用它来处理它的痛苦错误了。
发布于 2021-11-08 20:31:07
试着用sass替换节点sass。
npm uninstall node-sass
npm i -S sass
发布于 2021-02-16 08:58:48
$ npm uninstall node-sass
--这也将修复以下错误.
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/resolve-url-loader/index.js):
Error: resolve-url-loader: CSS error
source-map information is not available at url() declaration (found orphan CR, try removeCR option)
https://stackoverflow.com/questions/65594119
复制相似问题