Description
Environment
- Operating System:
Darwin
- Node Version:
v22.15.0
- Nuxt Version:
3.17.4
- CLI Version:
3.25.1
- Nitro Version:
2.11.12
- Package Manager:
pnpm@8.15.8
- Builder:
-
- User Config:
compatibilityDate
,devtools
,modules
- Runtime Modules:
@nuxt/icon@1.13.0
,@nuxt/ui@3.1.2
,@nuxt/fonts@0.11.4
- Build Modules:
-
Reproduction
I created a blank project using the command pnpm create nuxt xxx
without modifying any code or configuration. When attempting to start it with pnpm run dev
, an error occurred immediately.
I'm currently located in mainland China and using a VPN proxy. The URL https://fonts.google.com/metadata/fonts
is accessible either through direct browser connection or via the curl command.
In the terminal, I attempted to resolve this by setting proxy environment variables, but to no avail:
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
I've identified that the relevant code utilizes the fetch method from typescript/lib/lib.dom.d.ts#fetch
to request resources.
As a novice in this area, I'm seeking guidance on how to configure this method to utilize my proxy settings. Despite my efforts to research this matter, I haven't found any applicable solutions.
Your assistance would be greatly appreciated.
Describe the bug
WARN Could not fetch from https://fonts.google.com/metadata/fonts. Will retry in 1000ms. 3 retries left. 11:30:08 AM
WARN Could not fetch from https://fonts.google.com/metadata/icons?key=material_symbols&incomplete=true. Will retry in 1000ms. 3 retries left. 11:30:08 AM
WARN Could not fetch from https://fonts.google.com/metadata/fonts. Will retry in 1000ms. 2 retries left. 11:30:20 AM
WARN Could not fetch from https://fonts.google.com/metadata/icons?key=material_symbols&incomplete=true. Will retry in 1000ms. 2 retries left. 11:30:20 AM
WARN Could not fetch from https://fonts.google.com/metadata/fonts. Will retry in 1000ms. 1 retries left. 11:30:31 AM
WARN Could not fetch from https://fonts.google.com/metadata/icons?key=material_symbols&incomplete=true. Will retry in 1000ms. 1 retries left.
ERROR Could not initialize provider google. unifont will not be able to process fonts provided by this provider. fetch failed 11:30:43 AM
at node:internal/deps/undici/undici:13510:13
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at runNextTicks (node:internal/process/task_queues:69:3)
at process.processImmediate (node:internal/timers:453:9)
at process.callbackTrampoline (node:internal/async_hooks:130:17)
at async Object.getItem (node_modules/.pnpm/unifont@0.4.1/node_modules/unifont/dist/index.js:29:20)
at async node_modules/.pnpm/unifont@0.4.1/node_modules/unifont/dist/index.js:475:23
at async node_modules/.pnpm/unifont@0.4.1/node_modules/unifont/dist/index.js:654:35
at async Promise.all (index 2)
at async createUnifont (node_modules/.pnpm/unifont@0.4.1/node_modules/unifont/dist/index.js:652:3)
[cause]: Connect Timeout Error (attempted address: fonts.google.com:443, timeout: 10000ms)
at onConnectTimeout (node:internal/deps/undici/undici:2602:28)
at Immediate._onImmediate (node:internal/deps/undici/undici:2583:11)
at process.processImmediate (node:internal/timers:485:21)
at process.callbackTrampoline (node:internal/async_hooks:130:17)
Additional context
No response