错误截图:
主要矛盾:node与node-sass版本不匹配
问题详细信息:
项目中依赖的node-sass很可能已经不兼容新的node,对应版本兼容如下(或参考官方仓库):
- Supported Node.js versions vary by release, please consult the releases page.
- Node versions that hit end of life github.com/nodejs/Rele…, will be dropped from support at each node-sass release (major, minor).
- We will stop building binaries for unsupported releases, testing for breakages in dependency compatibility, but we will not block installations for those that want to support themselves.
- New node release require minor internal changes along with support from CI providers (AppVeyor, GitHub Actions). We will open a single issue for interested parties to subscribe to, and close additional issues.
Below is a quick guide for minimum and maximum supported versions of node-sass:
| NodeJS | Supported node-sass version | Node Module |
|---|---|---|
| Node 17 | 7.0+ | 102 |
| Node 16 | 6.0+ | 93 |
| Node 15 | 5.0+, <7.0 | 88 |
| Node 14 | 4.14+ | 83 |
| Node 13 | 4.13+, <5.0 | 79 |
| Node 12 | 4.12+ | 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 |
解决方法:
将node版本切换到node10.24.1,安装成功。