gulp常见问题及解决方法

执行gulp的时候报错

1
2
3
4
5
6
7
8
9
10
11
12
13
14
➜  front git:(main) ✗ gulp
Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (88)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
at module.exports (/Users/yiny/Sites/geekhall.cn/front/node_modules/node-sass/lib/binding.js:13:13)
at Object.<anonymous> (/Users/yiny/Sites/geekhall.cn/front/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Module.require (node:internal/modules/cjs/loader:997:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (/Users/yiny/Sites/geekhall.cn/front/node_modules/gulp-sass/index.js:166:21)
at Module._compile (node:internal/modules/cjs/loader:1108:14)

下面的命令可以修复:

1
npm rebuild node-sass