atorber / puppet-xp-getting-started

基于wechaty-puppet-xp的Windows微信机器人
35 stars 10 forks source link

无法安装 npm i wechaty-puppet-xp@next #7

Open JiWu1993 opened 1 month ago

JiWu1993 commented 1 month ago

运行npm i wechaty-puppet-xp@next后出现的代码如下:

C:\Users\harve\Documents\mychat2\puppet-xp-getting-started>npm i wechaty-puppet-xp@next npm WARN deprecated phin@2.9.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @hapi/pinpoint@1.0.2: Moved to 'npm install @sideway/pinpoint' npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated @hapi/formula@1.2.0: Moved to 'npm install @sideway/formula' npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address' npm WARN deprecated cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/joi@16.1.8: Switch to 'npm install joi' npm WARN deprecated sinon@13.0.2: 16.1.1 npm ERR! code 1 npm ERR! path C:\Users\harve\Documents\mychat2\puppet-xp-getting-started\node_modules\frida npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.12.2 runtime=node arch=x64 libc= platform=win32) npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@10.0.1 npm ERR! gyp info using node@20.12.2 | win32 | x64 npm ERR! gyp info find Python using Python version 3.12.3 found at "C:\Users\harve\AppData\Local\Programs\Python\Python312\python.exe" npm ERR! gyp info find VS using VS2022 (17.9.34902.65) found at: npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Users\harve\AppData\Local\Programs\Python\Python312\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\harve\Documents\mychat2\puppet-xp-getting-started\node_modules\frida\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\harve\AppData\Local\node-gyp\Cache\20.12.2\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\harve\AppData\Local\node-gyp\Cache\20.12.2', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\harve\\AppData\\Local\\node-gyp\\Cache\\20.12.2\\<(target_arch)\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\harve\Documents\mychat2\puppet-xp-getting-started\node_modules\frida', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'C:\Users\harve\Documents\mychat2\puppet-xp-getting-started\node_modules\frida\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp: binding.gyp not found (cwd: C:\Users\harve\Documents\mychat2\puppet-xp-getting-started\node_modules\frida) while trying to load binding.gyp npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:271:18) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:518:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm ERR! gyp ERR! System Windows_NT 10.0.19045 npm ERR! 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" npm ERR! gyp ERR! cwd C:\Users\harve\Documents\mychat2\puppet-xp-getting-started\node_modules\frida npm ERR! gyp ERR! node -v v20.12.2 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: C:\Users\harve\AppData\Local\npm-cache_logs\2024-05-20T22_34_02_926Z-debug-0.log

C:\Users\harve\Documents\mychat2\puppet-xp-getting-started>

s192516 commented 1 week ago

我也是这样

Eddy0644 commented 5 days ago

由这个 npm ERR! gyp: binding.gyp not found 可知确实缺少某些文件,但是注意到 npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.12.2 runtime=node arch=x64 libc= platform=win32) ,而我在我本机安装时加上verbose开关之后出现的类似报错为

npm ERR! prebuild-install http request GET https://github.com/frida/frida/releases/download/15.2.2/frida-v15.2.2-node-v115-win32-x64.tar.gz
npm ERR! prebuild-install http 404 https://github.com/frida/frida/releases/download/15.2.2/frida-v15.2.2-node-v115-win32-x64.tar.gz
npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.9.0 runtime=node arch=x64 libc= platform=win32)

因此判断为同时满足当前node版本以及项目frida版本要求的frida预编译包无法找到。因此依据 Frida's GitHub releases ,我将本机node版本从v20降级到v18的LTS版本,成功安装了项目依赖。希望能帮到各位。

From the error message npm ERR! gyp: binding.gyp not found, it's clear that some files are indeed missing. However, it's also noteworthy that the error message npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.12.2 runtime=node arch=x64 libc= platform=win32) indicates that no prebuilt binaries matching the current Node version and Frida version requirements were found.

When I installed it on my machine with the verbose switch enabled, I encountered a similar error:

npm ERR! prebuild-install http request GET https://github.com/frida/frida/releases/download/15.2.2/frida-v15.2.2-node-v115-win32-x64.tar.gz
npm ERR! prebuild-install http 404 https://github.com/frida/frida/releases/download/15.2.2/frida-v15.2.2-node-v115-win32-x64.tar.gz
npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.9.0 runtime=node arch=x64 libc= platform=win32)

This suggests that the prebuilt binaries for the required Node version and Frida version are not available. Therefore, based on the release information from Frida's GitHub releases, I downgraded the Node version on my machine to the LTS version of v18, and successfully installed the project dependencies.

I hope this helps everyone facing similar issues.