Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save guest271314/2779cfbb4a4f8ba3496e253e546c0104 to your computer and use it in GitHub Desktop.
Save guest271314/2779cfbb4a4f8ba3496e253e546c0104 to your computer and use it in GitHub Desktop.
undici@6.10.1 fetch() throwing for file: protocol request
TypeError: fetch failed
    at fetch (/node_modules/undici/index.js:109:13) {
  [cause]: TypeError: Invalid URL
      at new URL (node:internal/url:804:36)
      at parseURL (/node_modules/undici/lib/core/util.js:51:11)
      at Object.parseOrigin (/node_modules/undici/lib/core/util.js:117:9)
      at new Pool (/node_modules/undici/lib/dispatcher/pool.js:70:23)
      at Agent.defaultFactory (/node_modules/undici/lib/dispatcher/agent.js:22:7)
      at [dispatch] (/node_modules/undici/lib/dispatcher/agent.js:93:34)
      at Intercept (/node_modules/undici/lib/interceptor/redirect-interceptor.js:11:16)
      at [Intercepted Dispatch] (/node_modules/undici/lib/dispatcher/dispatcher-base.js:158:12)
      at Agent.dispatch (/node_modules/undici/lib/dispatcher/dispatcher-base.js:179:40)
      at /node_modules/undici/lib/web/fetch/index.js:2079:51 {
    code: 'ERR_INVALID_URL',
    input: 'null'
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment