今天安裝 npx create-react-app my-app 报错。 其他报错的方法这里就不讲了,其他好多站都有解决办法,这里把没有提到过的说下。 报错信息 gyp ERR! find VS gyp ERR! find VS msvs_version not set from command l…
今天安裝 npx create-react-app my-app 报错。

其他报错的方法这里就不讲了,其他好多站都有解决办法,这里把没有提到过的说下。

先给几个依赖的命令。

 npm config set python python3.9npm config set msvs_version 2015

报错信息

gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS running in VS Command Prompt, installation path is:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017"
gyp ERR! find VS - will only use this version
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS looking for Visual Studio 2013
gyp ERR! find VS - not found
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
gyp ERR! stack     at VisualStudioFinder.fail (D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstu
dio.js:121:47)
gyp ERR! stack     at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at D:\rymcu\electron-serialport\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:310:5)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\rymcu\\electron-serialport\\node_modules\\node-gyp\\bin
\node-gyp.js" "rebuild" "--target=7.3.2" "--arch=x64" "--dist-url=https://atom.io/download/electron"
gyp ERR! cwd D:\rymcu\electron-serialport\node_modules\@serialport\bindings
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v7.0.0
gyp ERR! not ok

解决办法的过程如下:

查看

npm config list
输出

; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.14.8 node/v14.10.1 win32 x64"; builtin config undefined
prefix = "C:\\Users\\Administrator\\AppData\\Roaming\\npm"; node bin location = E:\node\node.exe
; cwd = C:\Users\Administrator\Desktop
; HOME = C:\Users\Administrator
; "npm config ls -l" to show all defaults.

如果你看到

registry= …
这项用的是淘宝镜像,那么你就改回

registry="https://registry.npmjs.org/"

相关命令如下

npm config set registry="https://registry.npmjs.org/"

然后重新运行

npx create-react-app my-app

成功就OK了。

可能原因,淘宝镜像没有相应的依赖,所以会失败。
转载地址:https://jiaocheng.yilian001.com/141.html

error gyp ERR! stack Error: Could not find any Visual Studio installation to use相关推荐

  1. Mac安装webpack报错gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1解决

    安装webpack ,报错提示 gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ER ...

  2. ERR! configure error gyp ERR! stack Error: Can't find Python executable python

    Node.js 在安装模块的时候报错,缺少python环境. ERR! configure error gyp ERR! stack Error: Can't find Python executab ...

  3. OpenBmc开发错误6:gyp ERR! configure error gyp ERR! stack Error: socket hang up

    错误提示: gyp ERR! configure error gyp ERR! stack Error: socket hang up 原因分析: 没有设置网络代理 解决方法: 进入设置,选择&quo ...

  4. gyp ERR configure error gyp ERR stack Error: Command failed: C:....

    一.问题描述 npm install 报错 二.问题原因 node.js与系统的python版本冲突 我的是Py39 三.问题解决 执行 npm config set python python2.7 ...

  5. gyp ERR! stack Error: Can't find Python executable 'python'

    gyp ERR! stack Error: Can't find Python executable 'python' 系统: Win10 Gatsby使用一个Starter[1]进行npm inst ...

  6. npm i安装包依赖时 gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env

    报错内容 gyp verb ensuring that file exists: C:\Python27\python.exe gyp ERR! configure error gyp ERR! st ...

  7. gyp ERR! stack Error: Can't find Python executable python, you can set the PYTHON env variable.

    gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env va ...

  8. gyp ERR! stack Error: EACCES: permission denied, mkdir

    1.原因 npm 出于安全考虑不支持以 root 用户运行,即使你用 root 用户身份运行了,npm 会自动转成一个叫 nobody 的用户来运行,而这个用户几乎没有任何权限.这样的话如果你脚本里有 ...

  9. VUE如何导入开源项目及报错处理gyp ERR! stack Error: Command failed: D:\Python\python.EXE -c import sys; print “%s.

    首先git项目到本地 git clone +地址 之后再用idea导入项目,先要安装依赖, npm install 但有时会报缺少Python环境的错,用cnpm解决 步骤: 安装cnpm: npm ...

最新文章

  1. unicode表_Python数据库操作 Mysql数据库表引擎与字符集#学习猿地
  2. 机器学习:如何用相关性实现特征选择?
  3. 华为主题锁屏壁纸换不掉_快来看看华为与荣耀手机的这16款主题!别一直用系统默认主题啦!...
  4. 不止代码:乘法游戏 题解(区间dp)
  5. 学习手记(2019/7/05~2019/8/31)——快乐暑假
  6. java中各种数据类型的使用
  7. idea中Terminal显示不全或不显示问题的解决办法
  8. 跟 05 后拼年龄?算了,11 岁的他都成比特币专家了
  9. [转]SAP行业知识Qamp;A一览表
  10. 记一次tomcat故障排查(转)
  11. mysql 客户端可以访问_Mysql客户端工具可以连接,但是代码访问就会报错
  12. sql插入数据时自动插入时间
  13. “ARP欺骗”木马病毒
  14. AvalonDock 2.0+Caliburn.Micro+MahApps.Metro实现Metro风格插件式系统(一)
  15. qgis中加载矢量切片
  16. canvas实现图片剪切
  17. 两个向量叉乘表示什么意思_为什么两个空间向量的向量积的摸等于以这两个 – 手机爱问...
  18. 测试用例的设计-面试常见问题(基础篇)
  19. Node.js 网页瘸腿稍强点爬虫再体验
  20. 微信扫描小程序码登录 PC 网站 Demo

热门文章

  1. element动态form实现
  2. 计算机进程调度论文,计算机操作系统小论文Linux进程调度.doc
  3. 谷歌浏览器安卓版_谷歌Chrome Canary 82安卓版现可复制图片到剪贴板
  4. python 4舍5入_python中的四舍五入
  5. 0020-使用JDBC向Kudu表插入中文字符-双引号的秘密
  6. XenApp For Windows 2016 关闭程序后无法结束进程
  7. ubuntu 14.04 16.04 安装caffe+cuda8.0+pycafee总结
  8. 《微信小程序开发入门精要》——第2章,第2.8节带边距的水平等间隔排列
  9. Java编程的逻辑 (43) - 剖析TreeMap
  10. 斐波那契 (Fibonacci)数列