该错误提示是因为缺少Python环境或Windows SDK版本问题导致的,可以尝试以下解决方法:

  1. 安装Python环境,建议安装2.7版本,并将其添加到系统环境变量中。

  2. 更新Windows SDK版本,可以在Visual Studio中安装对应版本的Windows SDK。

  3. 尝试使用cnpm代替npm进行安装,命令为:cnpm i。

  4. 清除npm缓存,命令为:npm cache clean --force,然后再进行安装。

  5. 删除node_modules文件夹,重新安装依赖,命令为:rm -rf node_modules && npm install。

  6. 将node-sass依赖改为sass,命令为:npm install sass --save-dev。


原文地址: https://www.cveoy.top/t/topic/nek1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录