https://www.likecs.com/show-204247070.html#sc=800
npm install 报错,一大片红色ERR:
看到前面有一句:
Cannot download “https://github.com/sass/node-sass/releases/download/v4.12.0/win32-x64-64_binding.node”:
gyp ERR! stack Error: Can’t find Python executable “python”, you can set the PYTHON env variable.
网上找贴,解决方案,亲测有效:
(1)运行: npm uninstall node-sass 卸载安装失败的node-sass
(2)运行: npm install -g node-gyp
(3)运行: npm install --global --production windows-build-tools
注:可能报很多npm ERR!,我没管,后面依旧能运行。
(4)运行: npm install node-sass 重新安装