gyp ERR node-gyp失败处理

news/2024/12/22 0:43:00/

当前版本:
node v16.20.2
pnpm 8.14.3
npm 8.19.4

python失败

可以在微软的应用商店安装python

nodegypnode_10">node-gyp安装了和node一样的版本,然后失败

│ Building: C:\Program Files\nodejs\node.exe D:\data\work_code\data\xiangm\node_modules\.pnpm\node-gyp@7.1.2\n…
│ gyp info it worked if it ends with ok
│ gyp verb cli [
│ gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
│ gyp verb cli   'D:\\data\\work_code\\优凯飞行\\web\\ucare管理后台\\webVueBackstageManage\\node_modules\\.pnpm\\node-gyp@7.1.2\\node_modules\\node…
│ gyp verb cli   'rebuild',
│ gyp verb cli   '--verbose',
│ gyp verb cli   '--libsass_ext=',
│ gyp verb cli   '--libsass_cflags=',
│ gyp verb cli   '--libsass_ldflags=',
│ gyp verb cli   '--libsass_library='
│ gyp verb cli ]
│ gyp info using node-gyp@7.1.2
│ gyp info using node@16.20.2 | win32 | x64
│ gyp verb command rebuild []
│ gyp verb command clean []
│ gyp verb clean removing "build" directory
│ gyp verb command configure []
│ gyp verb find Python Python is not set from command line or npm configuration
│ gyp verb find Python Python is not set from environment variable PYTHON
│ gyp verb find Python checking if "python3" can be used
│ gyp verb find Python - executing "python3" to get executable path
│ gyp verb find Python - executable path is "C:\Users\admin123\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\…
│ gyp verb find Python - executing "C:\Users\admin123\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.ex…
│ gyp verb find Python - version is "3.12.7"
│ gyp info find Python using Python version 3.12.7 found at "C:\Users\admin123\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.1…
│ gyp verb get node dir no --target version specified, falling back to host node version: 16.20.2
│ gyp verb command install [ '16.20.2' ]
│ gyp verb install input version string "16.20.2"
│ gyp verb install installing version: 16.20.2
│ gyp verb install --ensure was passed, so won't reinstall if already installed
│ gyp verb install version is already installed, need to check "installVersion"
│ gyp verb got "installVersion" 9
│ gyp verb needs "installVersion" 9
│ gyp verb install version is good
│ gyp verb get node dir target node version installed: 16.20.2
│ gyp verb build dir attempting to create "build" dir: D:\data\work_code\data\xiangm\node_modules\.pnpm\node-s…
│ gyp verb build dir "build" dir needed to be created? D:\data\work_code\data\xiangm\node_modules\.pnpm\node-s…
│ gyp verb find VS msvs_version not set from command line or npm config
│ gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
│ gyp verb find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
│ gyp verb find VS looking for Visual Studio 2015
│ gyp verb find VS - not found
│ gyp verb find VS not looking for VS2013 as it is only supported up to Node.js 8
│ 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 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
│ gyp ERR! stack     at VisualStudioFinder.fail (D:\data\work_code\data\xiangm\node_modules\.pnpm\node-gyp@7.1…
│ gyp ERR! stack     at D:\data\work_code\data\xiangm\node_modules\.pnpm\node-gyp@7.1.2\node_modules\node-gyp\…
│ gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (D:\data\work_code\data\xiangm\node_modules\.p…
│ gyp ERR! stack     at D:\data\work_code\data\xiangm\node_modules\.pnpm\node-gyp@7.1.2\node_modules\node-gyp\…
│ gyp ERR! stack     at D:\data\work_code\data\xiangm\node_modules\.pnpm\node-gyp@7.1.2\node_modules\node-gyp\…
│ gyp ERR! stack     at D:\data\work_code\data\xiangm\node_modules\.pnpm\node-gyp@7.1.2\node_modules\node-gyp\…
│ gyp ERR! stack     at D:\data\work_code\data\xiangm\node_modules\.pnpm\node-gyp@7.1.2\node_modules\node-gyp\…
│ gyp ERR! stack     at ChildProcess.exithandler (node:child_process:410:5)
│ gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
│ gyp ERR! stack     at maybeClose (node:internal/child_process:1100:16)
│ gyp ERR! System Windows_NT 10.0.22631
│ gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\data\\work_code\\优凯飞行\\web\\ucare管理后台\\webVueBackstageManage\\node_modules\\.…
│ gyp ERR! cwd D:\data\work_code\data\xiangm\node_modules\.pnpm\node-sass@6.0.1\node_modules\node-sass
│ gyp ERR! node -v v16.20.2
│ gyp ERR! node-gyp -v v7.1.2
│ gyp ERR! not ok
│ Build failed with error code: 1

各种修改版本都失败

"sass-loader": "^6.0.6",
"sass-resources-loader": "^1.3.3",

这个版本是没有问题的

解决方法

“vue”: “^2.5.2”,
升级为
“vue”: “^2.6.10”,
不知道为啥,升级之后,就正常了

最后结果

dependencies:
+ @liveqing/liveplayer 2.7.20
+ array-includes 3.1.7
+ axios 0.18.1
+ browser-md5-file 1.1.1
+ cesium 1.58.1
+ clipboard 2.0.11
+ d3 5.16.0
+ draggable 4.2.0
+ echarts 4.9.0
+ el-tree-transfer 2.4.7
+ element-china-area-data 4.2.0
+ element-ui 2.15.14
+ exif-js 2.3.0
+ file-saver 2.0.5
+ flv.js 1.6.2
+ jquery-ui 1.13.2
+ js-md5 0.7.3
+ jsbarcode 3.11.6
+ jszip 3.2.1
+ leaflet 1.3.1
+ leaflet-hotline 0.4.0
+ leaflet.elevation 0.0.3
+ node-sass 6.0.1
+ protobufjs 7.2.5
+ qrcode 1.5.3
+ qrcodejs2 0.0.2
+ quill 1.3.7
+ rbush 3.0.1
+ ui 0.2.4
+ vue 2.7.15
+ vue-area-linkage 5.1.0
+ vue-quill-editor 3.0.6
+ vue-router 3.6.5
+ vuex 3.6.2
+ wangeditor 3.1.1
+ widgets 0.3.4devDependencies:
+ autoprefixer 7.2.6
+ babel-core 6.26.3
+ babel-helper-vue-jsx-merge-props 2.0.3
+ babel-loader 7.1.5
+ babel-plugin-syntax-jsx 6.18.0
+ babel-plugin-transform-runtime 6.23.0
+ babel-plugin-transform-vue-jsx 3.7.0
+ babel-polyfill 6.26.0
+ babel-preset-env 1.7.0
+ babel-preset-es2015 6.24.1
+ babel-preset-stage-2 6.24.1
+ chalk 2.4.2
+ copy-webpack-plugin 4.6.0
+ css-loader 0.28.11
+ extract-text-webpack-plugin 3.0.2
+ file-loader 1.1.11
+ friendly-errors-webpack-plugin 1.7.0
+ html-webpack-plugin 2.30.1
+ jquery 3.7.1
+ node-notifier 5.4.5
+ optimize-css-assets-webpack-plugin 3.2.1
+ ora 1.4.0
+ portfinder 1.0.32
+ postcss-import 11.1.0
+ postcss-loader 2.1.6
+ postcss-url 7.3.2
+ rimraf 2.7.1
+ sass-loader 6.0.7
+ sass-resources-loader 1.3.5
+ semver 5.7.2
+ shelljs 0.7.8
+ style-loader 0.21.0
+ uglifyjs-webpack-plugin 1.3.0
+ url-loader 0.5.9
+ vue-loader 13.7.3
+ vue-style-loader 3.1.2
+ vue-template-compiler 2.7.15
+ webpack 3.12.0
+ webpack-bundle-analyzer 2.13.1
+ webpack-dev-server 2.11.5
+ webpack-merge 4.2.2
+ webpack-parallel-uglify-plugin 1.1.4

http://www.ppmy.cn/news/1536688.html

相关文章

在掌控板中加载人教版信息科技教学指南中的educore库

掌控板中加载educore库 人教信息科技数字资源平台(https://ebook.mypep.cn/free)中的《信息科技教学指南硬件编程代码说明》文件中提到“本程序说明主要供教学参考。需要可编程主控板须支持运行MicroPython 脚本程序。希望有更多的主控板在固件中支持ed…

C语言中的文件操作(二)

C语言中的文件操作&#xff08;一&#xff09;-CSDN博客https://blog.csdn.net/Xiaodao12345djs/article/details/142746010?spm1001.2014.3001.5501 四、文件的顺序读写 1、fputc (字符输出函数/写) 将一个字符写入文件中 #include <stdio.h>int main() {FILE* pf fo…

构建高效水果购物平台:SpringBoot飘香网站案例

1系统概述 1.1 研究背景 如今互联网高速发展&#xff0c;网络遍布全球&#xff0c;通过互联网发布的消息能快而方便的传播到世界每个角落&#xff0c;并且互联网上能传播的信息也很广&#xff0c;比如文字、图片、声音、视频等。从而&#xff0c;这种种好处使得互联网成了信息传…

docker compose入门2—docker-compose.yaml中的version表示什么意思

在 Docker Compose 中&#xff0c;version 字段用于指定 docker-compose.yml 文件的版本格式。不同版本定义了不同的功能和语法&#xff0c;因此 version 决定了你能够使用哪些特性和指令。 常见的 Compose 文件版本 Version 1: 不需要明确指定 version 字段。只支持最基础的功…

linux基础 超级笔记

1.Linux系统的组成 Linux系统内核&#xff1a;提供系统最核心的功能&#xff0c;如软硬件和资源调度。 系统及应用程序&#xff1a;文件、任务管理器。 2.Linux发行版 通过修改内核代码自行集成系统程序&#xff0c;即封装。比如Ubuntu和centos这种。不过基础命令是完全相…

Brave编译指南2024 MacOS篇-为Brave项目做出贡献(八)

引言 在前几篇文章中&#xff0c;我们学习了如何编译、运行和维护Brave浏览器。现在&#xff0c;我们将探讨如何进一步参与Brave项目&#xff0c;为这个开源浏览器做出自己的贡献。无论你是想修复bug、添加新功能&#xff0c;还是改进文档&#xff0c;Brave社区都欢迎你的参与…

算法【更多二维动态规划题目】

本文不再从递归入手&#xff0c;而是直接从动态规划的定义入手&#xff0c;来解决更多二维动态规划问题。其中包含一些比较巧妙的尝试思路。 题目一 测试链接&#xff1a;https://leetcode.cn/problems/distinct-subsequences/ 分析&#xff1a;dp数组的含义是字符串s前i个字…

《RabbitMQ篇》消息应答和发布确认

消息应答 消息应答机制&#xff1a;消费者接收信息并处理完之后&#xff0c;告诉rabbitmq该信息已经处理&#xff0c;rabbitmq可以把该信息删除了. 消息自动重新入队&#xff1a;如果处理某个消息的消费者异常关闭了&#xff0c;没有发送ACK确认&#xff0c;rabbitmq会将其重…