GithubHelp home page GithubHelp logo

cosin2077 / chaty Goto Github PK

View Code? Open in Web Editor NEW
454.0 454.0 42.0 1.84 MB

one line code, satisfied all your ChatGPT imagination✨✨✨

JavaScript 3.06% TypeScript 91.22% HTML 0.62% CSS 5.09%
chatbot chatgpt chatgpt3 nodejs typescript wechat

chaty's People

Contributors

cosin2077 avatar yuyichen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chaty's Issues

微信登陆报错

[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 [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
npm WARN deprecated [email protected]: 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 [email protected]: 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 [email protected]: this library is no longer supported\n' +
'npm WARN deprecated [email protected]: 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 [email protected]: 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 [email protected]: 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权限

error after installation

install node-v18.15.0-x64.msi, and no problem when install package.
run "chaty" but encountered the following error. Please help, thanks,

C:\user\nodejs>npm i -g ichaty

changed 137 packages in 5s

20 packages are looking for funding
  run `npm fund` for details

C:\nodejs>chaty
C:\Users\user\AppData\Roaming\npm\node_modules\ichaty\node_modules\fs-extra\lib\index.js:5
  ...require('./fs'),
  ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\ichaty\lib\src\main\prepare\dir.js:3:18)

扫码后报错

请问扫码后这个报错是啥原因

❯ chaty run wechat

runWechatService...
✔ install pkgs for wechat service succeed!
\ starting build pkgs for wechat service......
> [email protected] build
> tsc


✔ build pkgs for wechat service succeed!

> [email protected] start
> node dist/index

[qrcode]

uncaughtException AssertionError [ERR_ASSERTION]: 1 == 0
    at Object.equal (/home/xxx/.npm/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)
    at /home/xxx/.npm/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 2,
  details: 'AssertionError [ERR_ASSERTION]: 1 == 0\n' +
    '    at Object.equal (/home/xxx/.npm/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)\n' +
    '    at /home/xxx/.npm/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}

微信群聊出错

uncaughtException GError: WatchdogAgent reset: lastFood: "{"data":"syncCheck()","timeoutMi
lliseconds":60000}"
at Watchdog.reset (/opt/bitnami/node/lib/node_modules/ichaty/lib/src/services/wechat/n
ode_modules/wechaty-puppet/dist/cjs/src/agents/watchdog-agent.js:48:39)
at Watchdog.emit (node:events:513:28)
at Timeout._onTimeout (/opt/bitnami/node/lib/node_modules/ichaty/lib/src/services/wech
at/node_modules/watchdog/dist/cjs/src/watchdog.js:84:18)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7) {
code: 2,
details: 'Error: WatchdogAgent reset: lastFood: "{"data":"syncCheck()","timeoutMilliseco
nds":60000}"\n' +
' at Watchdog.reset (/opt/bitnami/node/lib/node_modules/ichaty/lib/src/services/wec
hat/node_modules/wechaty-puppet/dist/cjs/src/agents/watchdog-agent.js:48:39)\n' +
' at Watchdog.emit (node:events:513:28)\n' +
' at Timeout._onTimeout (/opt/bitnami/node/lib/node_modules/ichaty/lib/src/services
/wechat/node_modules/watchdog/dist/cjs/src/watchdog.js:84:18)\n' +
' at listOnTimeout (node:internal/timers:559:17)\n' +
' at processTimers (node:internal/timers:502:7)'
}

微信登录有bug

错误如下:
https://wechaty.js.org/qrcode/https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FoYlBGtR2Ag%3D%3D

uncaughtException AssertionError [ERR_ASSERTION]: 1 == 0
at Object.equal (/usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)
at /usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 2,
details: 'AssertionError [ERR_ASSERTION]: 1 == 0\n' +
' at Object.equal (/usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)\n' +
' at /usr/local/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}

微信登录报错:Cannot read properties of undefined (reading 'status')

uncaughtException GError [TypeError]: Cannot read properties of undefined (reading 'status') at /opt/homebrew/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:170:30 at processTicksAndRejections (node:internal/process/task_queues:96:5) { code: 2, details: "TypeError: Cannot read properties of undefined (reading 'status')\n" + ' at /opt/homebrew/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:170:30\n' + ' at processTicksAndRejections (node:internal/process/task_queues:96:5)' }

node: v16.15.0
macOS: 13.2.1

执行chaty命令报错413

半个月前自己在linux上安装运行成功过,但是今天在window 系统全局安装了ichaty,但是执行chaty命令会报错

chaty --help
✖ check chaty version error: Request failed with status code 413
✖ check chaty version timeout

ichaty 安装版本 0.1.21,检查了本地相关配置

.npmrc文件如下

registry=https://registry.npmmirror.com/

ichaty .env文件内容如下

WEB_PORT=9522

NODE_PORT=9523

看了下源码有检查版本的代码,是不是请求的https://registry.npmmirror.com/ichaty 这个文件太大导致的?

Chaty login failed with status code 413

chaty checkVersion... +0ms
✖ check chaty version error: Request failed with status code 413
chaty Request failed with status code 413 +187ms
✖ check chaty version timeout
Node v18.14.2
macOS 13.2.1

微信扫码成功后,报错

uncaughtException AssertionError [ERR_ASSERTION]: 1 == 0
at Object.equal (/usr/local/lib/nodejs/node-v18.15.0-linux-arm64/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)
at /usr/local/lib/nodejs/node-v18.15.0-linux-arm64/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 2,
details: 'AssertionError [ERR_ASSERTION]: 1 == 0\n' +
' at Object.equal (/usr/local/lib/nodejs/node-v18.15.0-linux-arm64/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/util/global.js:69:24)\n' +
' at /usr/local/lib/nodejs/node-v18.15.0-linux-arm64/lib/node_modules/ichaty/lib/src/services/wechat/node_modules/wechat4u/lib/core.js:227:24\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'

登录是成功的但是问问题时出现401是啥原因呢?

login succeed!

now you can try chaty run web/node/command/etc...
[root@ecs-d687 ~]# chaty run command
run command-line bot service...
please input your question: hello
hello
Request failed with status code 401
please input your question: where are you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.