Skip to content

using proxy; icon downloads fail #75

Description

@f-zappa

Hi, I'm trying to run the docker image. I need to use a proxy for downloading the icon data and thus set the HTTP_PROXY and HTTPS_PROXY environment variables in my compose file. However, these doesn't seem to be respected by the downloader.

When I manually exec inside the container and run "npm install '@iconify/json'", the package is added (icons are still not returned by the api, however).

How to get it work?

iconify  | > @iconify/api@3.2.0 start
iconify  | > node --expose-gc lib/index.js
iconify  |
iconify  | [dotenv@17.2.3] injecting env (0) from .env -- tip: 🔐 encrypt with Dotenvx: https://dotenvx.com
iconify  | Listening on 0.0.0.0:3000
iconify  | Downloading https://registry.npmjs.org/@iconify/json/-/json-2.2.510.tgz
iconify  | Fetching: https://registry.npmjs.org/@iconify/json/-/json-2.2.510.tgz
iconify  | TypeError: fetch failed
iconify  |     at node:internal/deps/undici/undici:14900:13
iconify  |     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
iconify  |     at async downloadFile (file:///data/iconify-api/node_modules/@iconify/tools/lib/download/api/download.js:13:19)
iconify  |     at async downloadNPMPackage (file:///data/iconify-api/node_modules/@iconify/tools/lib/download/npm/index.js:32:3)
iconify  |     at async downloadRemoteArchive (file:///data/iconify-api/lib/downloaders/remote/download.js:54:20)
iconify  |     at async RemoteDownloader._init (file:///data/iconify-api/lib/downloaders/remote.js:47:25)
iconify  |     at async RemoteDownloader.init (file:///data/iconify-api/lib/downloaders/base.js:55:26)
iconify  |     at async initAPI (file:///data/iconify-api/lib/init.js:19:9)
iconify  |     at async file:///data/iconify-api/lib/index.js:13:5 {
iconify  |   [cause]: ConnectTimeoutError: Connect Timeout Error (attempted addresses: 104.16.10.34:443, 104.16.2.34:443, 104.16.11.34:443, 104.16.4.34:443, 104.16.5.34:443, 104.16.1.34:443, 104.16.8.34:443, 104.16.9.34:443, 104.16.0.34:443, 104.16.6.34:443, 104.16.7.34:443, 104.16.3.34:443, timeout: 10000ms)
iconify  |       at onConnectTimeout (node:internal/deps/undici/undici:2718:28)
iconify  |       at Immediate._onImmediate (node:internal/deps/undici/undici:2699:11)
iconify  |       at process.processImmediate (node:internal/timers:485:21) {
iconify  |     code: 'UND_ERR_CONNECT_TIMEOUT',
iconify  |     [Symbol(undici.error.UND_ERR)]: true,
iconify  |     [Symbol(undici.error.UND_ERR_CONNECT_TIMEOUT)]: true
iconify  |   }
iconify  | }
iconify  | API startup process complete

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions