wechaty / getting-started

A Starter Project Template for Wechaty works out-of-the-box
https://gitpod.io/#https://github.com/wechaty/wechaty-getting-started
Apache License 2.0
772 stars 342 forks source link

npm install error 依赖安装失败 #294

Open lovecodeyou opened 1 year ago

lovecodeyou commented 1 year ago

截图如下,望能跑起来的大哥解答一下 2023-06-30_001504

huozhong-in commented 12 months ago

macOS下同样的问题

❯ npm install
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/pinpoint@1.0.2: Moved to 'npm install @sideway/pinpoint'
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 formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
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 @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
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 puppeteer@13.7.0: < 19.4.0 is no longer supported
npm WARN deprecated puppeteer@13.7.0: < 19.4.0 is no longer supported
npm ERR! code 1
npm ERR! path /Users/dio/workspace/wechat/wechaty/getting-started/node_modules/frida
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.3.1 runtime=node arch=arm64 libc= platform=darwin)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.4.0
npm ERR! gyp info using node@20.3.1 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.8.17 found at "/opt/homebrew/Caskroom/miniforge/base/envs/wechaty-p38/bin/python3"
npm ERR! gyp info spawn /opt/homebrew/Caskroom/miniforge/base/envs/wechaty-p38/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/opt/homebrew/lib/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   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/dio/workspace/wechat/wechaty/getting-started/node_modules/frida/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/dio/Library/Caches/node-gyp/20.3.1/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=/Users/dio/Library/Caches/node-gyp/20.3.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/dio/Library/Caches/node-gyp/20.3.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/dio/workspace/wechat/wechaty/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   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: binding.gyp not found (cwd: /Users/dio/workspace/wechat/wechaty/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.onCpExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:325:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:511:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.5.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/20.3.1_1/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/dio/workspace/wechat/wechaty/getting-started/node_modules/frida
npm ERR! gyp ERR! node -v v20.3.1
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok
zhangtianrun commented 11 months ago

Same question on macOS. I think we need an update for the running guide:

Screen Shot 2023-07-13 at 9 32 56 PM
fkk0727 commented 10 months ago

请问解决了吗?我install 也报错这个问题

fkk0727 commented 10 months ago

macOS同样的问题

❯ npm install
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/pinpoint@1.0.2: Moved to 'npm install @sideway/pinpoint'
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 formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
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 @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
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 puppeteer@13.7.0: < 19.4.0 is no longer supported
npm WARN deprecated puppeteer@13.7.0: < 19.4.0 is no longer supported
npm ERR! code 1
npm ERR! path /Users/dio/workspace/wechat/wechaty/getting-started/node_modules/frida
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.3.1 runtime=node arch=arm64 libc= platform=darwin)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.4.0
npm ERR! gyp info using node@20.3.1 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.8.17 found at "/opt/homebrew/Caskroom/miniforge/base/envs/wechaty-p38/bin/python3"
npm ERR! gyp info spawn /opt/homebrew/Caskroom/miniforge/base/envs/wechaty-p38/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/opt/homebrew/lib/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   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/dio/workspace/wechat/wechaty/getting-started/node_modules/frida/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/dio/Library/Caches/node-gyp/20.3.1/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=/Users/dio/Library/Caches/node-gyp/20.3.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/dio/Library/Caches/node-gyp/20.3.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/dio/workspace/wechat/wechaty/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   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: binding.gyp not found (cwd: /Users/dio/workspace/wechat/wechaty/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.onCpExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:325:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:511:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.5.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/20.3.1_1/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/dio/workspace/wechat/wechaty/getting-started/node_modules/frida
npm ERR! gyp ERR! node -v v20.3.1
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok

请问解决了嘛

image
maotaoxiansheng commented 5 months ago

[root@cdms-tanchao-168-56 ~]# node -v v20.11.0 [root@cdms-tanchao-168-56 ~]# npm -v 10.2.4 [root@cdms-tanchao-168-56 ~]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) [root@cdms-tanchao-168-56 ~]# [root@cdms-tanchao-168-56 ~]# [root@cdms-tanchao-168-56 getting-started-main]# npm install npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/pinpoint@1.0.2: Moved to 'npm install @sideway/pinpoint' npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated koa-router@10.1.1: IMPORTANT 10x+ PERFORMANCE UPGRADE: Please upgrade to v12.0.1+ as we have fixed an issue with debuglog causing 10x slower router benchmark performance, see https://github.com/koajs/router/pull/173 npm WARN deprecated @hapi/formula@1.2.0: Moved to 'npm install @sideway/formula' npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau 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 @hapi/address@2.1.4: Moved to 'npm install @sideway/address' 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 WARN deprecated puppeteer@13.7.0: < 21.5.0 is no longer supported npm ERR! code 1 npm ERR! path /data/server/getting-started-main/node_modules/node-jq npm ERR! command failed npm ERR! command sh -c npm run install-binary npm ERR! > node-jq@1.12.0 install-binary npm ERR! > node scripts/install-binary.js npm ERR! npm ERR! Downloading jq from https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 npm ERR! GotError [RequestError]: connect ETIMEDOUT 20.205.243.166:443 npm ERR! at ClientRequest. (/data/server/getting-started-main/node_modules/got/index.js:182:22) npm ERR! at Object.onceWrapper (node:events:633:26) npm ERR! at ClientRequest.emit (node:events:518:28) npm ERR! at TLSSocket.socketErrorListener (node:_http_client:495:9) npm ERR! at TLSSocket.emit (node:events:518:28) npm ERR! at emitErrorNT (node:internal/streams/destroy:169:8) npm ERR! at emitErrorCloseNT (node:internal/streams/destroy:128:3) npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { npm ERR! code: 'ETIMEDOUT', npm ERR! host: 'github.com', npm ERR! hostname: 'github.com', npm ERR! method: 'GET', npm ERR! path: '/stedolan/jq/releases/download/jq-1.6/jq-linux64', npm ERR! protocol: 'https:', npm ERR! url: 'https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64' npm ERR! }

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-01-26T01_56_13_946Z-debug-0.log [root@cdms-tanchao-168-56 getting-started-main]# [root@cdms-tanchao-168-56 getting-started-main]#

MapleLea1f commented 3 months ago

tmpC028 windows一样不行