natemoo-re / astro-icon

Inline and sprite-based SVGs in Astro made easy!
https://astroicon.dev
Other
992 stars 57 forks source link

ERROR undici with astro-icon #128

Closed jojojojojoj5564656465465 closed 6 months ago

jojojojojoj5564656465465 commented 11 months ago
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11457:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runNextTicks (node:internal/process/task_queues:64:3)
    at process.processImmediate (node:internal/timers:449:9)
    at async request (/home/manjaro/DEV/POUBELLE/puredeno/node_modules/.pnpm/**astro-icon**@0.8.1/node_modules/astro-icon/lib/resolver.ts:15:17) {
  cause: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (/home/manjaro/DEV/POUBELLE/puredeno/node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/core/connect.js:182:24)
      at /home/manjaro/DEV/POUBELLE/puredeno/node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/core/connect.js:129:46
      at Immediate._onImmediate (/home/manjaro/DEV/POUBELLE/puredeno/node_modules/.pnpm/undici@5.22.1/node_modules/undici/lib/core/connect.js:170:9)
      at process.processImmediate (node:internal/timers:478:21) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
stramel commented 11 months ago

@jojojojojoj5564656465465 Can you provide any more information as to how you're getting this error?

jojojojojoj5564656465465 commented 11 months ago

@jojojojojoj5564656465465 Can you provide any more information as to how you're getting this error?

I get this big warning if I use astro icon I removed it and everything working fine

stramel commented 11 months ago

Can you provide what version of Astro and Astro Icon you're using and some example usages?

irfnrdh commented 11 months ago

image

error :

TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11457:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async request (/home/ups/Projects/low/node_modules/astro-icon/lib/resolver.ts:15:17)
    at async get (/home/ups/Projects/low/node_modules/astro-icon/lib/resolver.ts:33:10)
    at async Module.load [as default] (/home/ups/Projects/low/node_modules/astro-icon/lib/utils.ts:151:22)
    at async eval (/home/ups/Projects/low/node_modules/astro-icon/lib/Icon.astro:22:17)
    at async AstroComponentInstance.render (/home/ups/Projects/astroship/node_modules/astro/dist/runtime/server/render/astro/instance.js:33:7)
    at async renderAstroComponent (/home/ups/Projects/low/node_modules/astro/dist/runtime/server/render/component.js:334:3)
    at async Module.renderComponent (/home/ups/Projects/low/node_modules/astro/dist/runtime/server/render/component.js:354:12)
    at async Module.renderChild (/home/ups/Projects/low/node_modules/astro/dist/runtime/server/render/any.js:12:11) {
  cause: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (/home/ups/Projects/low/node_modules/undici/lib/core/connect.js:182:24)
      at /home/ups/Projects/low/node_modules/undici/lib/core/connect.js:129:46
      at Immediate._onImmediate (/home/ups/Projects/low/node_modules/undici/lib/core/connect.js:170:9)
      at process.processImmediate (node:internal/timers:476:21) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
  }
}

package :

───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: package.json
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ {
   2   │   "name": "low",
   3   │   "type": "module",
   4   │   "version": "0.0.1",
   5   │   "private": true,
   6   │   "scripts": {
   7   │     "dev": "astro dev",
   8   │     "start": "astro dev",
   9   │     "build": "astro build",
  10   │     "preview": "astro preview",
  11   │     "astro": "astro"
  12   │   },
  13   │   "dependencies": {
  14   │     "@astrojs/image": "^0.14.1",
  15   │     "@astrojs/mdx": "^0.16.0",
  16   │     "@astrojs/sitemap": "^1.0.1",
  17   │     "@astrojs/tailwind": "^3.0.1",
  18   │     "@fontsource/inter": "^4.5.15",
  19   │     "astro": "^2.0.11",
  20   │     "astro-feather-icons": "^1.0.2",
  21 ~ │     "astro-icon": "^0.8.1",
  22   │     "astro-navbar": "^1.1.5",
  23   │     "astro-seo": "^0.7.0",
  24   │     "tailwindcss": "^3.2.4"
  25   │   },
  26   │   "devDependencies": {
  27   │     "@tailwindcss/typography": "^0.5.9",
  28   │     "sharp": "^0.31.3"
  29   │   }
  30   │ }
───────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

eror when yarn dev on local try to upgrade but still same

*dev on arch linux

-_- downgrade to "astro-icon": "^0.8.0" solve the problem

kseikyo commented 9 months ago

Happened once to me but my error was related to not reaching the api.

TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11457:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async request (/Users/redacted/dev/redacted/redacted/redacted/node_modules/.pnpm/astro-icon@0.8.1/node_modules/astro-icon/lib/resolver.ts:15:17) {
  cause: Error: getaddrinfo ENOTFOUND api.astroicon.dev
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
    errno: -3008,
    code: 'ENOTFOUND',
    syscall: 'getaddrinfo',
    hostname: 'api.astroicon.dev'
  }
}

Related dependencies:

"astro": "^3.1.1",
"astro-icon": "^0.8.0",

Killing the dev server and starting again fixed the issue. I'm just concerned if it happens on prod.

natemoo-re commented 6 months ago

Please upgrade to Astro Icon v1. This problem should no longer occur.