以下的堆栈跟踪链接帮助我解决了这个问题。最初的回答。
Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.7.2
该链接(
https://github.com/sass/node-sass/releases/tag/v4.7.2
)清楚地显示了支持的节点版本。最初的回答。
OS Architecture Node
Windows x86 & x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9
... ... ...
我使用的是node 10.15.3
,很明显它不被支持。所以,我将节点版本降级到8.11.1
,再次执行npm install
。得到以下信息。
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x
Found bindings for the following environments:
- Windows 64-bit with Unsupported runtime (64)
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
按照建议,运行npm rebuild node-sass --force
。问题得到了解决。
注:Original Answer翻译成"最初的回答"