首页 > 其他分享 >pnpm安装依赖出现ELIFECYCLE  Command failed with exit code 1 Build failed

pnpm安装依赖出现ELIFECYCLE  Command failed with exit code 1 Build failed

时间:2024-05-28 17:12:30浏览次数:26  
标签:node code ERR ELIFECYCLE modules v18.19 failed gyp find

这种情况一般是安装了nvm的情况下会出现,错误提示一般如下

Progress: resolved 1713, reused 1633, downloaded 0, added 1632, done
node_modules/.pnpm/[email protected]/node_modules/core-js: Running postinstall script, done in 118ms
node_modules/.pnpm/[email protected]/node_modules/core-js: Running postinstall script, done in 155ms
node_modules/.pnpm/[email protected]/node_modules/deasync: Running install script, failed in 44.5s
.../[email protected]/node_modules/deasync install$ node ./build.js
│ F:\vue3-admin-template\node_modules\.pnpm\[email protected]\node_modules\deasync>if not defined npm_c
│ gyp info it worked if it ends with ok
│ gyp info using [email protected]
│ gyp info using [email protected] | win32 | ia32
│ gyp info find Python using Python version 3.8.0 found at "D:\tools\Python38-32\python.exe"
│ gyp http GET https://nodejs.org/download/release/v18.19.0/node-v18.19.0-headers.tar.gz
│ gyp http 200 https://nodejs.org/download/release/v18.19.0/node-v18.19.0-headers.tar.gz
│ gyp http GET https://nodejs.org/download/release/v18.19.0/SHASUMS256.txt
│ gyp http GET https://nodejs.org/download/release/v18.19.0/win-x86/node.lib
│ gyp http GET https://nodejs.org/download/release/v18.19.0/win-x64/node.lib
│ gyp http GET https://nodejs.org/download/release/v18.19.0/win-arm64/node.lib
│ gyp http 200 https://nodejs.org/download/release/v18.19.0/SHASUMS256.txt
│ gyp http 200 https://nodejs.org/download/release/v18.19.0/win-x64/node.lib
│ gyp http 200 https://nodejs.org/download/release/v18.19.0/win-x86/node.lib
│ gyp http 404 https://nodejs.org/download/release/v18.19.0/win-arm64/node.lib
│ 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
│ 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:\tools\nvm\v18.19.0\node_modules\pnpm\dist\node_modules\node-gyp\li
│ gyp ERR! stack     at D:\tools\nvm\v18.19.0\node_modules\pnpm\dist\node_modules\node-gyp\lib\find-visualstudio.js:75
│ gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (D:\tools\nvm\v18.19.0\node_modules\pnpm\dist\node_mod
│ gyp ERR! stack     at D:\tools\nvm\v18.19.0\node_modules\pnpm\dist\node_modules\node-gyp\lib\find-visualstudio.js:71
│ gyp ERR! stack     at D:\tools\nvm\v18.19.0\node_modules\pnpm\dist\node_modules\node-gyp\lib\find-visualstudio.js:38
│ gyp ERR! stack     at D:\tools\nvm\v18.19.0\node_modules\pnpm\dist\node_modules\node-gyp\lib\util.js:54:7
│ gyp ERR! stack     at D:\tools\nvm\v18.19.0\node_modules\pnpm\dist\node_modules\node-gyp\lib\util.js:33:16
│ gyp ERR! stack     at ChildProcess.exithandler (node:child_process:430:5)
│ gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
│ gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
│ gyp ERR! System Windows_NT 10.0.19045
│ gyp ERR! command "D:\\tools\\nodejs\\node.exe" "D:\\tools\\nvm\\v18.19.0\\node_modules\\pnpm\\dist\\node_modules\\no
│ gyp ERR! cwd F:\vue3-admin-template\node_modules\.pnpm\[email protected]\node_modules\deasync
│ gyp ERR! node -v v18.19.0
│ gyp ERR! node-gyp -v v8.4.1
│ gyp ERR! not ok
│ Build failed
└─ Failed in 44.5s
node_modules/.pnpm/[email protected][email protected]/node_modules/vue-demi: Running postinstall script, done in 416ms
 ELIFECYCLE  Command failed with exit code 1.

有时候用npm安装也会出现这样的错误,错误发生的原因好像是node的版本引起的, 我这里安装的是 18.19.0 32位版本的,
使用nvm重新安装一个 18.19.0 64位版本的就不报错了,特记录一下

标签:node,code,ERR,ELIFECYCLE,modules,v18.19,failed,gyp,find
From: https://www.cnblogs.com/lybaobei/p/18218458

相关文章

  • URLDecode
    PHP urldecode示例$str1=urlencode("百度");//$str1的值是%B0%D9%B6%C8$str2=urldecode($str1);//$str2的值就是“百度”javascripturl字符串编码和解码在JavaScript中,可以使用内置的encodeURIComponent函数来对URL进行编码,而使用decodeURIComponent函数来对URL进行解......
  • leedcode【349】. 两个数组的交集——Java解法
    Problem: 349.两个数组的交集题目思路解题方法复杂度Code效果题目给定两个数组nums1和nums2,返回它们的交集。输出结果中的每个元素一定是唯一的。我们可以不考虑输出结果的顺序。示例1:输入:nums1=[1,2,2,1],nums2=[2,2]输出:[2]示例2:输入:nums1=[......
  • leedcode【383】. 赎金信——Java解法
    Problem: 383.赎金信题目思路解题方法复杂度Code性能题目给你两个字符串:ransomNote和magazine,判断ransomNote能不能由magazine里面的字符构成。如果可以,返回true;否则返回false。magazine中的每个字符只能在ransomNote中使用一次。示例1:输入:ransomNot......
  • LeetCode-2877. 从表中创建 DataFrame
    2877.从表中创建DataFrame编写一个解决方案,基于名为student_data的二维列表创建一个DataFrame。这个二维列表包含一些学生的ID和年龄信息。DataFrame应该有两列,student_id和age,并且与原始二维列表的顺序相同。返回结果格式如下示例所示。示例1:输入:student_data:[......
  • cv2.imdecode 和 cv2.imread 的区别
    cv2.imdecode和cv2.imread都是OpenCV用于读取图像的函数,但它们用于不同的场景,处理方式也不同。cv2.imread用法:img=cv2.imread(image_path)功能:cv2.imread用于直接从文件系统中读取图像文件。image_path是图像文件的路径。读取后返回一个NumPy数组,表示图......
  • 关于报错:npm下载时出现node_modules\.pnpm\[email protected]\node_modules\node-s
    关于npminstall出现Failedin911msatF:\Sert-Vue-master\vue\node_modules\.pnpm\[email protected]\node_modules\node-sass ELIFECYCLE Commandfailedwithexitcode1. 最开始从GitHub拉了一个项目,然后npmi的时候出现了报错npmERR!gypERR!stackError:`......
  • Codeforces Round 948 (Div. 2)
    A.LittleNikita题意:\(n\)步操作,\(+1\)或\(-1\),最终结果是否等于\(m\)思路:设\(+1\)的操作次数为\(x\),\(-1\)的操作次数为\(y\)\[x+y=n\\x-y=m\]\[x=(n+m)/2\\y=(n-m)/2\]\((n-m)\)和\((n+m)\)均为偶数,即\(n\)和\(m\)均为偶数或同为奇数,且\(n>=m\)代码:voidsolve()......
  • Visual Studio 智能代码插件:CodeGeeX
    前言 在软件开发领域,高效的编程助手一直是提升开发者效率和质量的关键。随着人工智能技术的不断发展,智能编程助手逐渐成为开发者们不可或缺的工具。其中,CodeGeeX作为一款专为VisualStudio设计的免费智能编程助手,凭借其强大的功能和便捷的使用体验,赢得了广大开发者的青睐。 ......
  • Nginx: stat() failed (13: permission denied)
    解决server{listen[::]:80default_server;#SSLconfiguration##listen443ssldefault_server;#listen[::]:443ssldefault_server;##Note:YoushoulddisablegzipforSSLtraffic.#S......
  • vscode连接远程服务器
    ​vscode连接远程服务器1.安装ssh插件2.新建连接3.修改配置跑深度学习的项目常常需要比较好的显卡,有的时候自己电脑性能不够,需要借助服务器,可以用vscode连接。1.安装ssh插件在左侧extension选项中输入ssh,找到以下插件并安装。2.新建连接点击左下角的箭头选......