cosin2077 / chaty

one line code, satisfied all your ChatGPT imagination✨✨✨
448 stars 42 forks source link

微信登陆报错 #9

Open Minweiwangaaaa opened 1 year ago

Minweiwangaaaa commented 1 year ago

[root@ip-172-31-30-113 ~]# chaty run wechat runWechatService... / starting to install pkgs for wechat service....../root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:174 err = new Error(Command failed: ${joinedCmd}${output}`); ^

Error: Command failed: npm install npm WARN deprecated har-validator@5.1.5: this library is no longer supported 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 ERR! code 127 npm ERR! path /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown npm ERR! command failed npm ERR! command sh -c -- node-gyp-build npm ERR! sh: node-gyp-build: command not found

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-03-13T03_49_21_658Z-debug-0.log

at makeError (/root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:174:9)
at /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5) {

code: 127, stdout: '', stderr: 'npm WARN deprecated har-validator@5.1.5: this library is no longer supported\n' + '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.\n' + '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.\n' + 'npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142\n' + 'npm ERR! code 127\n' + 'npm ERR! path /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown\n' + 'npm ERR! command failed\n' + 'npm ERR! command sh -c -- node-gyp-build\n' + 'npm ERR! sh: node-gyp-build: command not found\n' + '\n' + 'npm ERR! A complete log of this run can be found in:\n' + 'npm ERR! /root/.npm/_logs/2023-03-13T03_49_21_658Z-debug-0.log\n', failed: true, signal: null, cmd: 'npm install', timedOut: false, killed: false }`

npm v16.19.1 amazon linux root权限

cosin2077 commented 1 year ago

[root@ip-172-31-30-113 ~]# chaty run wechat runWechatService... / starting to install pkgs for wechat service....../root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:174 err = new Error(Command failed: joinedCmd{output}`); ^

Error: Command failed: npm install npm WARN deprecated har-validator@5.1.5: this library is no longer supported 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 request/request#3142 npm ERR! code 127 npm ERR! path /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown npm ERR! command failed npm ERR! command sh -c -- node-gyp-build npm ERR! sh: node-gyp-build: command not found

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-03-13T03_49_21_658Z-debug-0.log

at makeError (/root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:174:9)
at /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5) {

code: 127, stdout: '', stderr: 'npm WARN deprecated har-validator@5.1.5: this library is no longer supported\n' + '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.\n' + '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.\n' + 'npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142\n' + 'npm ERR! code 127\n' + 'npm ERR! path /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown\n' + 'npm ERR! command failed\n' + 'npm ERR! command sh -c -- node-gyp-build\n' + 'npm ERR! sh: node-gyp-build: command not found\n' + '\n' + 'npm ERR! A complete log of this run can be found in:\n' + 'npm ERR! /root/.npm/_logs/2023-03-13T03_49_21_658Z-debug-0.log\n', failed: true, signal: null, cmd: 'npm install', timedOut: false, killed: false }`

npm v16.19.1 amazon linux root权限

看起来像是有些 linux的基础包没装,你可以试试 yum/apt install make glibc-devel gcc patch

Minweiwangaaaa commented 1 year ago

还是不行

runWechatService... \ starting to install pkgs for wechat service....../root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:174 err = new Error(Command failed: ${joinedCmd}${output}); ^

Error: Command failed: npm install npm WARN deprecated har-validator@5.1.5: this library is no longer supported 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 ERR! code 127 npm ERR! path /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown npm ERR! command failed npm ERR! command sh -c -- node-gyp-build npm ERR! sh: node-gyp-build: command not found

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-03-13T10_59_50_178Z-debug-0.log

at makeError (/root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:174:9)
at /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5) {

code: 127, stdout: '', stderr: 'npm WARN deprecated har-validator@5.1.5: this library is no longer supported\n' + '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.\n' + '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.\n' + 'npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142\n' + 'npm ERR! code 127\n' + 'npm ERR! path /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown\n' + 'npm ERR! command failed\n' + 'npm ERR! command sh -c -- node-gyp-build\n' + 'npm ERR! sh: node-gyp-build: command not found\n' + '\n' + 'npm ERR! A complete log of this run can be found in:\n' + 'npm ERR! /root/.npm/_logs/2023-03-13T10_59_50_178Z-debug-0.log\n', failed: true, signal: null, cmd: 'npm install', timedOut: false, killed: false }

cosin2077 commented 1 year ago

npm ERR! command sh -c -- node-gyp-build npm ERR! sh: node-gyp-build: command not found

看起来像是缺少一些编译包导致的

npm ERR! command sh -c -- node-gyp-build
npm ERR! sh: node-gyp-build: command not found

你可以试试

sudo npm i -g node-gyp-build
sudo npm uninstall -g ichaty
sudo npm install -g ichaty
Minweiwangaaaa commented 1 year ago

npm ERR! command sh -c -- node-gyp-build npm ERR! sh: node-gyp-build: command not found

看起来像是缺少一些编译包导致的

npm ERR! command sh -c -- node-gyp-build
npm ERR! sh: node-gyp-build: command not found

你可以试试

sudo npm i -g node-gyp-build
sudo npm uninstall -g ichaty
sudo npm install -g ichaty

还是不行

runWechatService...

Error: Command failed: npm install npm WARN deprecated har-validator@5.1.5: this library is no longer supported 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 ERR! code 127 npm ERR! path /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown npm ERR! command failed npm ERR! command sh -c -- node-gyp-build npm ERR! sh: node-gyp-build: command not found

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-03-14T02_46_17_508Z-debug-0.log

at makeError (/root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:174:9)
at /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5) {

code: 127, stdout: '', stderr: 'npm WARN deprecated har-validator@5.1.5: this library is no longer supported\n' + '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.\n' + '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.\n' + 'npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142\n' + 'npm ERR! code 127\n' + 'npm ERR! path /root/.nvm/versions/node/v16.19.1/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown\n' + 'npm ERR! command failed\n' + 'npm ERR! command sh -c -- node-gyp-build\n' + 'npm ERR! sh: node-gyp-build: command not found\n' + '\n' + 'npm ERR! A complete log of this run can be found in:\n' + 'npm ERR! /root/.npm/_logs/2023-03-14T02_46_17_508Z-debug-0.log\n', failed: true, signal: null, cmd: 'npm install', timedOut: false, killed: false

Minweiwangaaaa commented 1 year ago

各种错误。。。有不有docker版本? 我换了docker的centos纯净版 彻底啥依赖问题应该也没 然后我装了node v16 还是错

starting to install pkgs for wechat service....../usr/local/lib/node_modules/ichaty/node_modules/execa/index.js:174 err = new Error(Command failed: ${joinedCmd}${output}`); ^

Error: Command failed: npm install npm WARN deprecated har-validator@5.1.5: this library is no longer supported 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 ERR! code 1 npm ERR! path /usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown npm ERR! command failed npm ERR! command sh -c node-gyp-build npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.3.1 npm ERR! gyp info using node@16.19.1 | linux | arm64 npm ERR! gyp info find Python using Python version 3.6.8 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/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 '/usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/root/.cache/node-gyp/16.19.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=/root/.cache/node-gyp/16.19.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.19.1/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown', 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 ERR! build error npm ERR! gyp ERR! stack Error: not found: make npm ERR! gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:10:17) npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:57:18 npm ERR! gyp ERR! stack at new Promise () npm ERR! gyp ERR! stack at step (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:54:21) npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:71:22 npm ERR! gyp ERR! stack at new Promise () npm ERR! gyp ERR! stack at subStep (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:69:33) npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:80:22 npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5 npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 npm ERR! gyp ERR! System Linux 5.15.49-linuxkit npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown npm ERR! gyp ERR! node -v v16.19.1 npm ERR! gyp ERR! node-gyp -v v9.3.1 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-03-16T12_46_19_131Z-debug-0.log

at makeError (/usr/local/lib/node_modules/ichaty/node_modules/execa/index.js:174:9)
at /usr/local/lib/node_modules/ichaty/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5) {

code: 1, stdout: '', stderr: 'npm WARN deprecated har-validator@5.1.5: this library is no longer supported\n' + '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.\n' + '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.\n' + 'npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142\n' + 'npm ERR! code 1\n' + 'npm ERR! path /usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown\n' + 'npm ERR! command failed\n' + 'npm ERR! command sh -c node-gyp-build\n' + 'npm ERR! gyp info it worked if it ends with ok\n' + 'npm ERR! gyp info using node-gyp@9.3.1\n' + 'npm ERR! gyp info using node@16.19.1 | linux | arm64\n' + 'npm ERR! gyp info find Python using Python version 3.6.8 found at "/usr/bin/python3"\n' + 'npm ERR! gyp info spawn /usr/bin/python3\n' + 'npm ERR! gyp info spawn args [\n' + "npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',\n" + "npm ERR! gyp info spawn args 'binding.gyp',\n" + "npm ERR! gyp info spawn args '-f',\n" + "npm ERR! gyp info spawn args 'make',\n" + "npm ERR! gyp info spawn args '-I',\n" + "npm ERR! gyp info spawn args '/usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown/build/config.gypi',\n" + "npm ERR! gyp info spawn args '-I',\n" + "npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',\n" + "npm ERR! gyp info spawn args '-I',\n" + "npm ERR! gyp info spawn args '/root/.cache/node-gyp/16.19.1/include/node/common.gypi',\n" + "npm ERR! gyp info spawn args '-Dlibrary=shared_library',\n" + "npm ERR! gyp info spawn args '-Dvisibility=default',\n" + "npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.19.1',\n" + "npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',\n" + "npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.19.1/<(target_arch)/node.lib',\n" + "npm ERR! gyp info spawn args '-Dmodule_root_dir=/usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown',\n" + "npm ERR! gyp info spawn args '-Dnode_engine=v8',\n" + "npm ERR! gyp info spawn args '--depth=.',\n" + "npm ERR! gyp info spawn args '--no-parallel',\n" + "npm ERR! gyp info spawn args '--generator-output',\n" + "npm ERR! gyp info spawn args 'build',\n" + "npm ERR! gyp info spawn args '-Goutput_dir=.'\n" + 'npm ERR! gyp info spawn args ]\n' + 'npm ERR! gyp ERR! build error \n' + 'npm ERR! gyp ERR! stack Error: not found: make\n' + 'npm ERR! gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:10:17)\n' + 'npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:57:18\n' + 'npm ERR! gyp ERR! stack at new Promise ()\n' + 'npm ERR! gyp ERR! stack at step (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:54:21)\n' + 'npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:71:22\n' + 'npm ERR! gyp ERR! stack at new Promise ()\n' + 'npm ERR! gyp ERR! stack at subStep (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:69:33)\n' + 'npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:80:22\n' + 'npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5\n' + 'npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5\n' + 'npm ERR! gyp ERR! System Linux 5.15.49-linuxkit\n' + 'npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"\n' + 'npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/leveldown\n' + 'npm ERR! gyp ERR! node -v v16.19.1\n' + 'npm ERR! gyp ERR! node-gyp -v v9.3.1\n' + 'npm ERR! gyp ERR! not ok\n' + '\n' + 'npm ERR! A complete log of this run can be found in:\n' + 'npm ERR! /root/.npm/_logs/2023-03-16T12_46_19_131Z-debug-0.log\n', failed: true, signal: null, cmd: 'npm install', timedOut: false, killed: false }`

cosin2077 commented 1 year ago

目前暂时没有docker版本,后续应该会推出

'npm ERR! gyp ERR! build error \n' +
'npm ERR! gyp ERR! stack Error: not found: make

看报错是缺少很多编译环境的包导致的 如果是centos 可以运行

sudo yum group install "Development Tools"

来安装make gcc g++等