当前位置: 首页 > news >正文

node_modules\deasync: Command failed.

运行:“yarn install” 时报错 

PS D:\WebPro\hainan-mini-program> yarn install       
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > babel-loader@8.2.2" has unmet peer dependency "@babel/core@^7.0.0".
warning " > @vue/cli-plugin-eslint@4.5.12" has incorrect peer dependency "eslint@>= 1.6.0 < 7.0.0".
warning "@vue/cli-plugin-eslint > eslint-loader@2.2.1" has incorrect peer dependency "eslint@>=1.6.0 <7.0.0".
warning " > babel-core@7.0.0-bridge.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > @vue/eslint-config-standard@6.0.0" has incorrect peer dependency "eslint-plugin-promise@^4.2.1".
warning "@vue/eslint-config-standard > eslint-config-standard@16.0.2" has incorrect peer dependency "eslint-plugin-promise@^4.2.1".
[4/4] Building fresh packages...
[-/5] ⠐ waiting...
[-/5] ⠐ waiting...
[-/5] ⠈ waiting...
[-/5] ⠈ waiting...
error D:\WebPro\hainan-mini-program\node_modules\deasync: Command failed.
Exit code: 1
Command: node ./build.js
Arguments: 
Directory: D:\WebPro\hainan-mini-program\node_modules\deasync
Output:
D:\WebPro\hainan-mini-program\node_modules\deasync>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@16.16.0 | win32 | x64
gyp info find Python using Python version 3.11.0 found at "C:\Users\xin\AppData\Local\Programs\Python\Python311\python.exe"
gyp ERR! find VS
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 checking VS2022 (17.4.33205.214) found at:
gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (D:\nvm\v16.16.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
gyp ERR! stack     at D:\nvm\v16.16.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (D:\nvm\v16.16.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
gyp ERR! stack     at D:\nvm\v16.16.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
gyp ERR! stack     at D:\nvm\v16.16.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
gyp ERR! stack     at D:\nvm\v16.16.0\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at D:\nvm\v16.16.0\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:406:5)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
gyp ERR! System Windows_NT 10.0.22631
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\WebPro\hainan-mini-program\node_modules\deasync
gyp ERR! node -v v16.16.0

按网上说的安装Visual Studio中的C++桌面开发工具和Windows 11的SDK,安装完之后还是报错,最后发现是Node.js的版本太老了,我用的Node.js16,换成Node.js的18.18.0就好了。

http://www.dtcms.com/a/114405.html

相关文章:

  • cursor机器码重置
  • K8s安全体系全面剖析:从攻击面到最佳实践
  • [创业之路-352]:从创业和公司经营的角度看:分析美国的三大财务报表
  • AI随身翻译设备:从翻译工具到智能生活伴侣
  • SpringBoot+MyBatis Plus+PageHelper+vue+mysql 实现用户信息增删改查功能
  • easy-poi 一对多导出
  • 戴尔笔记本 ubuntu 22.04 开机后进入initramfs界面
  • 网络编程—TCP/IP模型(TCP协议)
  • JSONP跨域访问漏洞
  • #SVA语法滴水穿石# (013)关于 disable iff、matched 、expect 的用法
  • Mysql 数据库下载安装
  • 数字统计题解
  • 【C++奇遇记】C++中的进阶知识(继承(一))
  • Visual FoxPro 6.0学习笔记十五
  • 定制一款国密浏览器(1):Chromium 源码获取和构建
  • 常见前端GET请求以及对应的Spring后端接收接口写法
  • Docker快速安装MongoDB并配置主从同步
  • WiFi加密协议
  • RoMo: Robust Motion Segmentation Improves Structure from Motion
  • 【c语言】结构体
  • [自制调试工具]构建高效调试利器:Debugger 类详解
  • at定时任务(超详细)
  • SpringBoot整合JUnit
  • [ctfshow web入门] web1
  • 【学习笔记】深度学习环境部署相关
  • 提高MCU的效率方法
  • Redis常见命令
  • 反向查询详解以Django为例
  • 速解!Cadence SPB24.1 ORCAD 开始页空白难题
  • Chapter06_图像复原