Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

error when click login button #137

Description

@xqyi

Describe the bug
error when click ChatGPT Login button:
image

To Reproduce
Steps to reproduce the behavior:

  1. git clone the source code
  2. npm i
  3. npm run dev (started on localhost:3000)
  4. open localhost:3000 in microsoft edge
  5. click prompt button
  6. enter openai key in textbox and click login button, then get error message

click-prompt:dev: click-prompt:dev: Import trace for requested module: click-prompt:dev: ../../node_modules/node-fetch/lib/index.js click-prompt:dev: ./src/api/user.ts click-prompt:dev: ./src/components/ClickPrompt/ClickPromptButton.tsx click-prompt:dev: No secret key env in the server. click-prompt:dev: error - TypeError: fetch failed click-prompt:dev: at Object.fetch (node:internal/deps/undici/undici:11413:11) click-prompt:dev: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { click-prompt:dev: cause: Error: getaddrinfo ENOTFOUND undefined click-prompt:dev: at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) click-prompt:dev: at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) { click-prompt:dev: errno: -3008, click-prompt:dev: code: 'ENOTFOUND', click-prompt:dev: syscall: 'getaddrinfo', click-prompt:dev: hostname: 'undefined' click-prompt:dev: }, click-prompt:dev: page: '/api/chatgpt/user' click-prompt:dev: } click-prompt:dev: warn - ../../node_modules/node-fetch/lib/index.js click-prompt:dev: Module not found: Can't resolve 'encoding' in 'C:\Users\xqyi\click-prompt\node_modules\node-fetch\lib' click-prompt:dev: click-prompt:dev: Import trace for requested module: click-prompt:dev: ../../node_modules/node-fetch/lib/index.js click-prompt:dev: ./src/api/user.ts click-prompt:dev: wait - compiling /_error (client and server)... click-prompt:dev: ./src/components/ClickPrompt/ClickPromptButton.tsx click-prompt:dev: warn - ../../node_modules/node-fetch/lib/index.js click-prompt:dev: Module not found: Can't resolve 'encoding' in 'C:\Users\xqyi\click-prompt\node_modules\node-fetch\lib' click-prompt:dev: click-prompt:dev: Import trace for requested module: click-prompt:dev: ../../node_modules/node-fetch/lib/index.js click-prompt:dev: ./src/api/user.ts click-prompt:dev: ./src/components/ClickPrompt/ClickPromptButton.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions