-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fetch failed when run program #390
Comments
The network request is initiated in the node layer and not in the browser, make sure you have a proxy enabled for node? (e.g. TUN mode for proxy software, or enable terminal proxy). One way to verify this is to run |
I have encountered the same problem when deploying with Docker ,"fetch failed",I know it’s probably because of proxy.
my docker-compose.yml like this:
I use |
遇到了同样的问题 ,无法解决 |
@cailei0596 @ladypiapia @xyxbc-git If you are running the app on Docker, make sure to configure the proxy settings for Docker. Login to docker and curl api.open.com make sure your setting is correct. |
I can ping the api.openai.com well. But still got this error, any thoughts or solutions? |
Replace
in
can solve this error in my case. |
ubuntu22
leo@leo-virtual-machine:
/chatgpt-demo$ node -v/chatgpt-demo$ npm -vv20.0.0
leo@leo-virtual-machine:
9.6.4
确认不是网络问题,用代理和不用代理都试过了
[email protected] dev /home/leo/chatgpt-demo
🚀 astro v2.1.3 started in 429ms
┃ Local http://localhost:3000/
┃ Network use --host to expose
fetch failed (https://esm.sh/@iconify-json/ph/icons.json)
error fetch failed (https://esm.sh/@iconify-json/ph/icons.json)
File:
/home/leo/chatgpt-demo/node_modules/.pnpm/[email protected]/node_modules/ofetch/dist/shared/ofetch.f223b849.cjs:182:24
Code:
181 | }
> 182 | context.response = await fetch(
| ^
183 | context.request,
184 | context.options
185 | ).catch(async (error) => {
Stacktrace:
FetchError: fetch failed (https://esm.sh/@iconify-json/ph/icons.json)
at async $fetchRaw2 (/home/leo/chatgpt-demo/node_modules/.pnpm/[email protected]/node_modules/ofetch/dist/shared/ofetch.f223b849.cjs:182:24)
error fetch failed (https://esm.sh/@iconify-json/ph/icons.json)
File:
/home/leo/chatgpt-demo/node_modules/.pnpm/[email protected]/node_modules/ofetch/dist/shared/ofetch.f223b849.cjs:182:24
Code:
181 | }
> 182 | context.response = await fetch(
| ^
183 | context.request,
184 | context.options
185 | ).catch(async (error) => {
Stacktrace:
FetchError: fetch failed (https://esm.sh/@iconify-json/ph/icons.json)
at async $fetchRaw2 (/home/leo/chatgpt-demo/node_modules/.pnpm/[email protected]/node_modules/ofetch/dist/shared/ofetch.f223b849.cjs:182:24)
(x2)
^C ELIFECYCLE Command failed.
The text was updated successfully, but these errors were encountered: