node-sass 报错 Error: not found: python2

解决方案:

  1. 配置npm 使用的版本为python2
npm config set python D:\Python27\python.exe

注意把D:\Python27\python.exe换成自己电脑上python2所在的路径

2. 安装windows-build-tools, 要用管理员权限运行命令行, 安装完成后有些电脑可能需要重启才能生效

npm install --global windows-build-tools

重新安装node-sass

 

Add a Comment

您的电子邮箱地址不会被公开。