Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-sass 新解法 #517

Open
johanazhu opened this issue Mar 29, 2022 · 5 comments
Open

node-sass 新解法 #517

johanazhu opened this issue Mar 29, 2022 · 5 comments

Comments

@johanazhu
Copy link

hexo-renderer-sass 这个库3年前就停更了,所以对 node-sass 的解决方案是将 node 降级到15以下(因为 node-sass 要与 node 版本匹配,而 hexo-renderer-sass 使用的库是v4.14.1,所以要降级到15以下)

目前因为其他库要将 node 升级15以上,所以就形成冲突,我的解决办法是进入node_module 的 hexo-renderer-hexo 中,将这个库的 node-sass 升级至 6.0.1,然后就能解析了

还有一种想到的方法,因为 hexo-renderer-sass 代码很简单,可以直接拷贝库重新做个 hexo-renderer-sass2 库,将 node-sass 更新也可以

@tufu9441
Copy link
Owner

感谢你的分享!我前段时间更新Nodejs和Hexo的时候也发现了,于是将Nodejs降级到了v14.18.3后便不再报错了。你说的最后一种方法,我在网上看到已经有人做了尝试,并fork了hexo-renderer-sass的库,见:https://github.com/cocowool/hexo-renderer-sass

@tufu9441 tufu9441 pinned this issue Mar 29, 2022
@johanazhu
Copy link
Author

cool

@domeniczz
Copy link

domeniczz commented Nov 8, 2022

感谢你的分享!我前段时间更新Nodejs和Hexo的时候也发现了,于是将Nodejs降级到了v14.18.3后便不再报错了。你说的最后一种方法,我在网上看到已经有人做了尝试,并fork了hexo-renderer-sass的库,见:https://github.com/cocowool/hexo-renderer-sass

我尝试安装,但是不行诶

以下两种都尝试了,第一种就是 deprecated 无法安装,第二种就是卡住不动无法安装

我用 nvm,切换了 node 12.18.1 和 node 16.15.0,都无法成功

npm install --save hexo-renderer-sass

npm install --save-dev hhttps://github.com/cocowool/hexo-renderer-sass.git

@cirry
Copy link

cirry commented Nov 8, 2022

npm install hexo-renderer-sass-next --save 即可

@cdnf
Copy link

cdnf commented Apr 10, 2024

这个早就有替代方案了:解决 hexo-renderer-sass 无法安装

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants