npm下载前端vue-admin-template-master模板的依赖报错

前端使用vue-admin-template-master,在使用npm下载依赖的时候总报错。
最开始我使用的时vue-admin-template-master是视频资源,结果报错,百度查不出来。我觉得有没有可能是因为是版本老的问题,就去官网下载,还真解决了一部分bug,但是不够,报错如下

error code 1
error path F:\webstrom项目\SpringBoot大项目实战\vue-admin-template-master\node_modules\deasync
error command failed
error command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
error gyp info it worked if it ends with ok
error gyp info using node-gyp@8.3.0
error gyp info using node@16.13.0 | win32 | x64
error gyp info find Python using Python version 3.7.7 found at "C:\Users\asus\AppData\Local\Programs\Python\Python37\python.exe"
error gyp ERR! find VS
error gyp ERR! find VS msvs_version not set from command line or npm config
error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
error gyp ERR! find VS could not use PowerShell to find Visual Studio or newer, try re-running with '--loglevel silly' for more details
error gyp ERR! find VS looking for Visual Studio 2015
error gyp ERR! find VS - not found
error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
error gyp ERR! find VS
error gyp ERR! find VS **************************************************************
9800 error gyp ERR! find VS You need to install the latest version of Visual Studio
9800 error gyp ERR! find VS including the "Desktop development with C++" workload.
9800 error gyp ERR! find VS For more information consult the documentation at:
error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
error gyp ERR! find VS **************************************************************
error gyp ERR! find VS
error gyp ERR! configure error
error gyp ERR! stack Error: Could not find any Visual Studio installation to use
error gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
error gyp ERR! stack     at C:\Users\asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
error gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
error gyp ERR! stack     at C:\Users\asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
error gyp ERR! stack     at C:\Users\asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
error gyp ERR! stack     at C:\Users\asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
error gyp ERR! stack     at C:\Users\asus\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
error gyp ERR! stack     at ChildProcess.exithandler (node:child_process:404:5)
error gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
error gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
error gyp ERR! System Windows_NT 10.0.19042
error gyp ERR! command "D:\\node.js\\node.exe" "C:\\Users\\asus\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
9800 error gyp ERR! cwd F:\webstrom项目\SpringBoot大项目实战\vue-admin-template-master\node_modules\deasync
error gyp ERR! node -v v16.13.0
error gyp ERR! node-gyp -v v8.3.0
error gyp ERR! not ok
verbose exit 1

百度查出来的都是说node.js的版本过高,要降低版本。我下载的是官网的稳定版,不太想降低版本。

问题发现:通过翻译错误日志和百度解决了

**************************************************************
9800 error gyp ERR! find VS You need to install the latest version of Visual Studio
9800 error gyp ERR! find VS including the "Desktop development with C++" workload.
9800 error gyp ERR! find VS For more information consult the documentation at:
error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
error gyp ERR! find VS **************************************************************

解决问题:下载最新版本的Visual Studio,我下载的是Visual Studio2019
解决参考: https://www.cnblogs.com/irobotzz/p/12336767.html

感想:花了差不多三个小时才解决,C盘6G多的内存没了,心痛。

posted @   黯渊  阅读(904)  评论(0编辑  收藏  举报
编辑推荐:
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
阅读排行:
· 使用C#创建一个MCP客户端
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· ollama系列1:轻松3步本地部署deepseek,普通电脑可用
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示