Skip to content
On this page

依赖下载问题 ​

node-sass 安装不上 ​

两种方案:

  • 使用 dart-sass 替换 node-sass

  • 使用 taobao.org 镜像

根目录创建 .npmrc 文件

bash
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

项目锁定 Node 版本 ​

  • package.json

在 package.json 文件中新增 engines 配置

json
"engines": {
  "node": "<=14.16.0"
}
  • npmrc

根目录创建 .npmrc 文件,锁定版本

bash
engine-strict = true