0
点赞
收藏
分享

微信扫一扫

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

 

举报

相关推荐

0 条评论