Node 与 node-sass 的版本对应
337
2024-07-17
正文
在Vue项目中通过yarn install偶尔会遇到安装 node-sass: Command failed. 失败的情况,这极有可能是因为node-sass的版本与所使用node的版本不匹配造成的。
所以,在使用node-sass时需要注意对应的node版本,版本对应关系见下面的表格。
| NodeJS | Supported node-sass version | Node Module |
|---|---|---|
| Node 20 | 9.0+ | 115 |
| Node 19 | 8.0+ | 111 |
| Node 18 | 8.0+ | 108 |
| Node 17 | 7.0+, <8.0 | 102 |
| Node 16 | 6.0+ | 93 |
| Node 15 | 5.0+, <7.0 | 88 |
| Node 14 | 4.14+, <9.0 | 83 |
| Node 13 | 4.13+, <5.0 | 79 |
| Node 12 | 4.12+, <8.0 | 72 |
| Node 11 | 4.10+, <5.0 | 67 |
| Node 10 | 4.9+, <6.0 | 64 |
| Node 8 | 4.5.3+, <5.0 | 57 |
| Node <8 | <5.0 | <57 |
参考
yarn 安装 node-sass: Command failed. 失败_yarn node-sass: command failed.-CSDN博客
node-sass - npm (npmjs.com)
- 97
- 33
-
分享