anse-app / chatgpt-demo

Minimal web UI for ChatGPT.

Home Page:https://chatgpt.ddiu.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

throw new TypeError(`${context} is not a ReadableStream.`);

powersee opened this issue · comments

Describe the bug

机器 Mac mini M1

❯ node -v
v16.13.2

❯ npm -v
8.3.0

按照 readme 操作之后,运行不起来

❯ npm run dev

novel-gpt@0.0.1 dev
astro dev

(node:55714) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
🚀 astro v2.0.17 started in 40ms

┃ Local http://localhost:3000/
┃ Network use --host to expose

file:///Users/ming/code/chatgpt-demo/node_modules/node-fetch-native/dist/shared/node-fetch-native.2b047dc1.mjs:432
throw new TypeError(${context} is not a ReadableStream.);
^

TypeError: First parameter has member 'readable' that is not a ReadableStream.
at assertReadableStream (file:///Users/ming/code/chatgpt-demo/node_modules/node-fetch-native/dist/shared/node-fetch-native.2b047dc1.mjs:432:21)
at convertReadableWritablePair (file:///Users/ming/code/chatgpt-demo/node_modules/node-fetch-native/dist/shared/node-fetch-native.2b047dc1.mjs:3509:11)
at ReadableStream.pipeThrough (file:///Users/ming/code/chatgpt-demo/node_modules/node-fetch-native/dist/shared/node-fetch-native.2b047dc1.mjs:3584:33)
at fetchFinale (/Users/ming/code/chatgpt-demo/node_modules/undici/lib/fetch/index.js:973:52)
at mainFetch (/Users/ming/code/chatgpt-demo/node_modules/undici/lib/fetch/index.js:773:5)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Reproduction

1

System Info

1

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
commented

相同问题

commented

node v18

感谢 @likui628 问题已解决。

因为我在 Mac,通过

brew install node@18

可以安装好,然后把 /opt/homebrew/opt/node@18/bin 加入环境变量。

之后再来运行项目就 OK 了。

@khum08 你或许可以参考一下。

确实 需要node 18+