周凯,个人博客

  • 前端
  • 嵌入式
  • 工具
  • 后端
  • 随笔
个人记录
  1. 首页
  2. 前端
  3. 正文

Node16+版本出现node-sass兼容性问题

2022年 11月 9日 1207点热度 1人点赞 0条评论

警告如下

DEPRECATION WARNING: The selector ".jnpf-editor-quill > > > .ql-container.ql-snow" is invalid CSS. It will be omitted from the generated CSS.
This will be an error in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/bogus-combinators

   ╷
99 │   >>> .ql-container.ql-snow {
   │   ^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    stdin 99:3  root stylesheet

解决

  • 查看 https://sass-lang.com/d/bogus-combinators地址发现, 已经弃用部分属性
  • node < 16
    • 卸载旧版本的node-sass和sass-loader,安装sass和sass-loader,不再使用node-sass
      npm uninstall sass-loader node-sass
      npm install sass-loader@8.0.2 sass@1.26.5 -D

      -如果不生效,执行 npm rebuild node-sass

  • node >= 16
  • 安装node16+相对应版本的node-sass和sass-loader
    npm i node-sass@6.0.1 sass-loader@10.2.0
    • 如果不生效,尝试执行 npm rebuild node-sass

🎯 拓展阅读提示

本文涉及的内容已同步至公众号后台,我会在那里分享更多深度内容和实用技巧

→ 点击关注:一行梦境

公众号二维码
本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: node-sass sass
最后更新:2022年 11月 9日

周凯

这个人很懒,什么都没留下

打赏 点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2022-现在 周凯,个人博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

蒙ICP备18004897号