//首先清除我们已经安装过的版本:
 npm uninstall node-sass 
 npm uninstall sass-loader
 npm uninstall style-loader
 //注意我们清除的时候可以选择全局的清除 全局的安装,否则下次创建 项目还会有同样的错误 执行重复的操作
//淘宝镜像安装
 npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/  
  //安装7.3.1版本的sass
 npm install sass-loader@7.3.1 --save-dev   
  // 安装style-loader
 npm install style-loader --save-dev       
 

建议安装的版本和package.json中node-sass、sass-load的配置版本对应,并且更改packer.json文件后删除node_modules文件后重新安装

否则会出现node_sass版本不兼容的问题

GitHub 加速计划 / no / node-sass
10
0
下载
:rainbow: Node.js bindings to libsass
最近提交(Master分支:2 个月前 )
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 年前
Logo

新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐