
node-sass版本不兼容问题(已解决)
node-sass
:rainbow: Node.js bindings to libsass
项目地址:https://gitcode.com/gh_mirrors/no/node-sass

·
node-sass版本不兼容问题(已解决)
估计很多小伙伴都遇到node-sass版本不兼容的问题,今天分享给大家如何定位问题,怎样去查找并兼容自己项目中的nod-sass版本!
文章目录
小提示:你可能会出现如下报错,接着往下看
Syntax Error: Error: Node Sass version 7.0.1 is incompatible with ^4.0.0.
第一步:查看自己的node版本
// 输入命名行 查看当前项目node版本
node -v
***如下图所示:我这里当前版本v16.15.0
第二步:查看npm上的node-sass对应版本输出
1、老规矩传送门【查看node-sass版本】
2、在官网上查看自己项目中对应的版本
3、我本地node版本是16.15.0,所以我需要安装 node-sass 版本为6.0+ ;
第三步:删除项目中已安装的node-sass版本
1、先卸载本地项目中以前安装的node-sass版本插件
// 删除命令行
npm i -D sass
// 或者
npm uninstall node-sass -D
第四步:安装指定版本,并重新启动项目即可
1、如何安装指定版本,并启动项目
// 指定版本安装
npm install node-sass@6.0.0 --save-dev
// 项目运行
npm run serve
如此简单的骚操作 你学会了吗
总结:
前端路上 | 所知甚少,唯善学。
各位小伙伴有什么疑问,欢迎留言探讨。
— 关注我:前端路上不迷路 —




:rainbow: Node.js bindings to libsass
最近提交(Master分支:6 个月前 )
6081731a
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com> 1 年前
62c0f46c
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com> 1 年前
更多推荐
所有评论(0)