前言
该问题多数出现在 npm install
安装依赖与 npm run dev/server
运行项目时,根本原因就是 node-sass
版本问题。
终端完整报错信息如下:
# SEO
Syntax Error: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
注意:必须在项目根目录,打开终端执行如下所有操作。
首先,把 node-sass
卸载掉,执行如下命令:
cnpm u node-sass
如果卸载报错(或成功),请直接忽略,接着执行如下命令:
cnpm i --save node-sass
写在后面
为了更精准解决问题,我本地 node / npm
版本如下: