mac node-sass 安装错误

今天在安装node-sass的时候,出现了下面的错误:

(base) ➜  mall4v git:(master) ✗ npm install node-sass

> node-sass@4.12.0 install /Users/admin/Documents/ccnu/mall4j/mall4v/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/darwin-x64-79_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.12.0/darwin-x64-79_binding.node":

HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@4.12.0 postinstall /Users/admin/Documents/ccnu/mall4j/mall4v/node_modules/node-sass
> node scripts/build.js

Building: /usr/local/Cellar/node/13.11.0/bin/node /Users/admin/Documents/ccnu/mall4j/mall4v/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
....

报了一大堆的错误,我的系统是mac。

解决方法

npm uninstall node-sass
npm install node-sass

就行了,我的日志为:

(base) ➜  mall4v git:(master) ✗ npm uninstall node-sass
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN sass-loader@6.0.6 requires a peer of node-sass@^4.0.0 but none is installed. You must install peer dependencies yourself.

audited 1702 packages in 15.046s

26 packages are looking for funding
  run `npm fund` for details

found 1057 vulnerabilities (55 low, 11 moderate, 990 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
(base) ➜  mall4v git:(master) ✗ npm install node-sass

> node-sass@4.14.1 install /Users/admin/Documents/ccnu/mall4j/mall4v/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/darwin-x64-79_binding.node
Download complete  ⸩ ⠋ :
Binary saved to /Users/admin/Documents/ccnu/mall4j/mall4v/node_modules/node-sass/vendor/darwin-x64-79/binding.node
Caching binary to /Users/admin/.npm/node-sass/4.14.1/darwin-x64-79_binding.node

> node-sass@4.14.1 postinstall /Users/admin/Documents/ccnu/mall4j/mall4v/node_modules/node-sass
> node scripts/build.js

Binary found at /Users/admin/Documents/ccnu/mall4j/mall4v/node_modules/node-sass/vendor/darwin-x64-79/binding.node
Testing binary
Binary is fine
+ node-sass@4.14.1
added 48 packages from 54 contributors and audited 1750 packages in 164.697s

27 packages are looking for funding
  run `npm fund` for details

found 1059 vulnerabilities (55 low, 11 moderate, 992 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

农民小飞侠

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值