mac node-sass 安装错误

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

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

> [email protected] 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

> [email protected] 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 [email protected] 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

> [email protected] 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

> [email protected] 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
+ [email protected]
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

猜你喜欢

转载自blog.csdn.net/w5688414/article/details/106343553
今日推荐