日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學(xué)無先后,達者為師

網(wǎng)站首頁 編程語言 正文

解決(gyp、python等問題):gyp ERR! find VS msvs_version not set from command line or npm config

作者:云邊的快樂貓 更新時間: 2024-03-20 編程語言

一、遇到問題

gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use

二、出現(xiàn)問題的原因

就是這個項目缺少很多node.js相關(guān)的開發(fā)工具和依賴,比如python、Visual Studio、gyp等等

三、解決辦法

1.先設(shè)置npm的源為國內(nèi)的淘寶鏡像源

npm config set registry https://registry.npm.taobao.org

?

2.執(zhí)行這個命令自動檢測下載python、Visual Studio等等這些需要的東西。

npm install --g --production windows-build-tools

這個命令是用于在 Windows 操作系統(tǒng)上安裝 windows-build-tools 包,它是一個 Node.js 模塊,用于安裝和配置在 Windows 上構(gòu)建 Node.js 模塊所需的開發(fā)工具和依賴項?

下載完成后使用快捷鍵CTRL+C結(jié)束當(dāng)前的命令?

原文鏈接:https://blog.csdn.net/m0_52861000/article/details/132914900

  • 上一篇:沒有了
  • 下一篇:沒有了
欄目分類
最近更新