Skip to content

[Web] Can't install onnxruntime-node behind corporate proxy #23231

@jnzw

Description

@jnzw

Describe the issue

npm ERR! command failed
npm ERR! command sh -c node ./script/install
npm ERR! Downloading "https://github.com/microsoft/onnxruntime/releases/download/v1.20.1/onnxruntime-linux-x64-gpu-1.20.1.tgz"...
npm ERR! node:internal/deps/undici/undici:11576
npm ERR!     Error.captureStackTrace(err, this);
npm ERR!           ^
npm ERR!
npm ERR! TypeError: fetch failed
npm ERR!     at Object.fetch (node:internal/deps/undici/undici:11576:11)
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
npm ERR!   cause: ConnectTimeoutError: Connect Timeout Error
npm ERR!       at onConnectTimeout (node:internal/deps/undici/undici:8522:28)
npm ERR!       at node:internal/deps/undici/undici:8480:50
npm ERR!       at Immediate._onImmediate (node:internal/deps/undici/undici:8511:13)
npm ERR!       at process.processImmediate (node:internal/timers:476:21) {
npm ERR!     code: 'UND_ERR_CONNECT_TIMEOUT'
npm ERR!   }
npm ERR! }
npm ERR!
npm ERR! Node.js v18.17.0

The fetch doesn't respect http_proxy and https_proxy set in the environment:

fetch(artifactUrl).then((res) => {

To reproduce

npm install onnxruntime-node

Urgency

No response

ONNX Runtime Installation

Other / Unknown

ONNX Runtime Version or Commit ID

1.20.1

Execution Provider

Other / Unknown

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform:webissues related to ONNX Runtime web; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions