litellm - 💡(How to fix) Fix [Bug]: Nodeenv installation is triggered on startup [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#24554Fetched 2026-04-08 01:27:07
View on GitHub
Comments
1
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×2commented ×1renamed ×1

Error Message

1774426630.066 0 10.XX.XX.XX TCP_DENIED/403 3392 CONNECT nodejs.org:443 - HIER_NONE/- text/html

{"message": "prisma db error: Traceback (most recent call last):\n File "/opt/python/lib/python3.13/urllib/request.py", line 1319, in do_open\n h.request(req.get_method(), req.selector, req.data, headers,\n ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n encode_chunked=req.has_header('Transfer-encoding'))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/opt/python/lib/python3.13/http/client.py", line 1358, in request\n self._send_request(method, url, body, headers, encode_chunked)\n ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/opt/python/lib/python3.13/http/client.py", line 1404, in _send_request\n self.endheaders(body, encode_chunked=encode_chunked)\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/opt/python/lib/python3.13/http/client.py", line 1353, in endheaders\n self._send_output(message_body, encode_chunked=encode_chunked)\n ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/opt/python/lib/python3.13/http/client.py", line 1113, in _send_output\n self.send(msg)\n ~~~~~~~~~^^^^^\n File "/opt/python/lib/python3.13/http/client.py", line 1057, in send\n self.connect()\n ~~~~~~~~~~~~^^\n File "/opt/python/lib/python3.13/http/client.py", line 1492, in connect\n super().connect()\n ~~~~~~~~~~~~~~~^^\n File "/opt/python/lib/python3.13/http/client.py", line 1033, in connect\n self._tunnel()\n ~~~~~~~~~~~~^^\n File "/opt/python/lib/python3.13/http/client.py", line 1001, in _tunnel\n raise OSError(f"Tunnel connection failed: {code} {message.strip()}")\nOSError: Tunnel connection failed: 403 Forbidden\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "<frozen runpy>", line 198, in _run_module_as_main\n File "<frozen runpy>", line 88, in _run_code\n File "/opt/litellm/lib/python3.13/site-packages/nodeenv.py", line 1566, in <module>\n main()\n ~~~~^^\n File "/opt/litellm/lib/python3.13/site-packages/nodeenv.py", line 1137, in main\n args.node = get_last_stable_node_version()\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^\n File "/opt/litellm/lib/python3.13/site-packages/nodeenv.py", line 1069, in get_last_stable_node_version\n return _get_last_node_version()\n File "/opt/litellm/lib/python3.13/site-packages/nodeenv.py", line 1062, in _get_last_node_version\n for v in _get_versions_json() if version_filter(v)), None)\n ~~~~~~~~~~~~~~~~~~^^\n File "/opt/litellm/lib/python3.13/site-packages/nodeenv.py", line 1024, in _get_versions_json\n response = urlopen('%s/index.json' % src_base_url)\n File "/opt/litellm/lib/python3.13/site-packages/nodeenv.py", line 652, in urlopen\n return urllib2.urlopen(req)\n ~~~~~~~~~~~~~~~^^^^^\n File "/opt/python/lib/python3.13/urllib/request.py", line 189, in urlopen\n return opener.open(url, data, timeout)\n ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^\n File "/opt/python/lib/python3.13/urllib/request.py", line 489, in open\n response = self._open(req, data)\n File "/opt/python/lib/python3.13/urllib/request.py", line 506, in _open\n result = self._call_chain(self.handle_open, protocol, protocol +\n '_open', req)\n File "/opt/python/lib/python3.13/urllib/request.py", line 466, in _call_chain\n result = func(*args)\n File "/opt/python/lib/python3.13/urllib/request.py", line 1367, in https_open\n return self.do_open(http.client.HTTPSConnection, req,\n ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n context=self._context)\n ^^^^^^^^^^^^^^^^^^^^^^\n File "/opt/python/lib/python3.13/urllib/request.py", line 1322, in do_open\n raise URLError(err)\nurllib.error.URLError: <urlopen error Tunnel connection failed: 403 Forbidden>\nnodeenv installation failed; You may want to try installing nodejs-bin as it is more reliable.\nTraceback (most recent call last):\n File "/opt/litellm/bin/prisma", line 6, in <module>\n sys.exit(main())\n ~~~~^^\n File "/opt/litellm/lib/python3.13/site-packages/prisma/cli/cli.py", line 39, in main\n sys.exit(prisma.run(args[1:]))\n ~~~~~~~~~~^^^^^^^^^^\n File "/opt/litellm/lib/python3.13/site-packages/prisma/cli/prisma.py", line 37, in run\n process = node.run(\n ^^^^^^^^\n File "/opt/litellm/lib/python3.13/site-packages/prisma/_proxy.py", line 19, in getattr\n return getattr(self.get_proxied(), attr)\n ~~~~~~~~~~~~~~~~~~~~^^\n File "/opt/litellm/lib/python3.13/site-packages/prisma/_proxy.py", line 35, in get_proxied\n self.__proxied = proxied = self.load()\n ~~~~~~~~~~~~~^^\n File "/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py", line 406, in load\n return resolve(self.target)\n File "/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py", line 282, in resolve\n return NodeBinaryStrategy.resolve(target)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n File "/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py", line 161, in resolve\n return NodeBinaryStrategy.from_nodeenv(target)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n File "/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py", line 191, in from_nodeenv\n raise exc\n File "/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py", line 174, in from_nodeenv\n subprocess.run(\n ~~~~~~~~~~~~~~^\n [\n ^\n ...<8 lines>...\n stderr=sys.stderr,\n ^^^^^^^^^^^^^^^^^^\n )\n ^\n File "/opt/python/lib/python3.13/subprocess.py", line 577, in run\n raise CalledProcessError(retcode, process.args,\n output=stdout, stderr=stderr)\nsubprocess.CalledProcessError: Command '['/opt/litellm/bin/python3', '-m', 'nodeenv', '/home/nonroot/.cache/prisma-python/nodeenv']' returned non-zero exit status 1.\n, e: {'x86': False, 'risc': False, 'lts': False}\n", "level": "INFO", "timestamp": "2026-03-25T08:12:57.717352", "x86": false, "risc": false, "lts": false}

Code Example

1774426630.066      0 10.XX.XX.XX TCP_DENIED/403 3392 CONNECT nodejs.org:443 - HIER_NONE/- text/html



{"message": "prisma db error: Traceback (most recent call last):\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 1319, in do_open\n    h.request(req.get_method(), req.selector, req.data, headers,\n    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n              encode_chunked=req.has_header('Transfer-encoding'))\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1358, in request\n    self._send_request(method, url, body, headers, encode_chunked)\n    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1404, in _send_request\n    self.endheaders(body, encode_chunked=encode_chunked)\n    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1353, in endheaders\n    self._send_output(message_body, encode_chunked=encode_chunked)\n    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1113, in _send_output\n    self.send(msg)\n    ~~~~~~~~~^^^^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1057, in send\n    self.connect()\n    ~~~~~~~~~~~~^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1492, in connect\n    super().connect()\n    ~~~~~~~~~~~~~~~^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1033, in connect\n    self._tunnel()\n    ~~~~~~~~~~~~^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1001, in _tunnel\n    raise OSError(f\"Tunnel connection failed: {code} {message.strip()}\")\nOSError: Tunnel connection failed: 403 Forbidden\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"<frozen runpy>\", line 198, in _run_module_as_main\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 1566, in <module>\n    main()\n    ~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 1137, in main\n    args.node = get_last_stable_node_version()\n                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 1069, in get_last_stable_node_version\n    return _get_last_node_version()\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 1062, in _get_last_node_version\n    for v in _get_versions_json() if version_filter(v)), None)\n             ~~~~~~~~~~~~~~~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 1024, in _get_versions_json\n    response = urlopen('%s/index.json' % src_base_url)\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 652, in urlopen\n    return urllib2.urlopen(req)\n           ~~~~~~~~~~~~~~~^^^^^\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 189, in urlopen\n    return opener.open(url, data, timeout)\n           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 489, in open\n    response = self._open(req, data)\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 506, in _open\n    result = self._call_chain(self.handle_open, protocol, protocol +\n                              '_open', req)\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 466, in _call_chain\n    result = func(*args)\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 1367, in https_open\n    return self.do_open(http.client.HTTPSConnection, req,\n           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                        context=self._context)\n                        ^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 1322, in do_open\n    raise URLError(err)\nurllib.error.URLError: <urlopen error Tunnel connection failed: 403 Forbidden>\nnodeenv installation failed; You may want to try installing `nodejs-bin` as it is more reliable.\nTraceback (most recent call last):\n  File \"/opt/litellm/bin/prisma\", line 6, in <module>\n    sys.exit(main())\n             ~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/cli.py\", line 39, in main\n    sys.exit(prisma.run(args[1:]))\n             ~~~~~~~~~~^^^^^^^^^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/prisma.py\", line 37, in run\n    process = node.run(\n              ^^^^^^^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/_proxy.py\", line 19, in __getattr__\n    return getattr(self.__get_proxied__(), attr)\n                   ~~~~~~~~~~~~~~~~~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/_proxy.py\", line 35, in __get_proxied__\n    self.__proxied = proxied = self.__load__()\n                               ~~~~~~~~~~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py\", line 406, in __load__\n    return resolve(self.target)\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py\", line 282, in resolve\n    return NodeBinaryStrategy.resolve(target)\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py\", line 161, in resolve\n    return NodeBinaryStrategy.from_nodeenv(target)\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py\", line 191, in from_nodeenv\n    raise exc\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py\", line 174, in from_nodeenv\n    subprocess.run(\n    ~~~~~~~~~~~~~~^\n        [\n        ^\n    ...<8 lines>...\n        stderr=sys.stderr,\n        ^^^^^^^^^^^^^^^^^^\n    )\n    ^\n  File \"/opt/python/lib/python3.13/subprocess.py\", line 577, in run\n    raise CalledProcessError(retcode, process.args,\n                             output=stdout, stderr=stderr)\nsubprocess.CalledProcessError: Command '['/opt/litellm/bin/python3', '-m', 'nodeenv', '/home/nonroot/.cache/prisma-python/nodeenv']' returned non-zero exit status 1.\n, e: {'x86': False, 'risc': False, 'lts': False}\n", "level": "INFO", "timestamp": "2026-03-25T08:12:57.717352", "x86": false, "risc": false, "lts": false}
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

I set up a fresh installation of litellm using the hardened docker image. However, it tries to download nodejs when initialising the database. I am running an air-gapped environment using only squid to communicate with the internet.

Is this wanted behavior?

Steps to Reproduce

  1. Setup your environment using https://hub.docker.com/hardened-images/catalog/dhi/litellm
  2. run the app

Relevant log output

1774426630.066      0 10.XX.XX.XX TCP_DENIED/403 3392 CONNECT nodejs.org:443 - HIER_NONE/- text/html



{"message": "prisma db error: Traceback (most recent call last):\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 1319, in do_open\n    h.request(req.get_method(), req.selector, req.data, headers,\n    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n              encode_chunked=req.has_header('Transfer-encoding'))\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1358, in request\n    self._send_request(method, url, body, headers, encode_chunked)\n    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1404, in _send_request\n    self.endheaders(body, encode_chunked=encode_chunked)\n    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1353, in endheaders\n    self._send_output(message_body, encode_chunked=encode_chunked)\n    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1113, in _send_output\n    self.send(msg)\n    ~~~~~~~~~^^^^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1057, in send\n    self.connect()\n    ~~~~~~~~~~~~^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1492, in connect\n    super().connect()\n    ~~~~~~~~~~~~~~~^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1033, in connect\n    self._tunnel()\n    ~~~~~~~~~~~~^^\n  File \"/opt/python/lib/python3.13/http/client.py\", line 1001, in _tunnel\n    raise OSError(f\"Tunnel connection failed: {code} {message.strip()}\")\nOSError: Tunnel connection failed: 403 Forbidden\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"<frozen runpy>\", line 198, in _run_module_as_main\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 1566, in <module>\n    main()\n    ~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 1137, in main\n    args.node = get_last_stable_node_version()\n                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 1069, in get_last_stable_node_version\n    return _get_last_node_version()\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 1062, in _get_last_node_version\n    for v in _get_versions_json() if version_filter(v)), None)\n             ~~~~~~~~~~~~~~~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 1024, in _get_versions_json\n    response = urlopen('%s/index.json' % src_base_url)\n  File \"/opt/litellm/lib/python3.13/site-packages/nodeenv.py\", line 652, in urlopen\n    return urllib2.urlopen(req)\n           ~~~~~~~~~~~~~~~^^^^^\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 189, in urlopen\n    return opener.open(url, data, timeout)\n           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 489, in open\n    response = self._open(req, data)\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 506, in _open\n    result = self._call_chain(self.handle_open, protocol, protocol +\n                              '_open', req)\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 466, in _call_chain\n    result = func(*args)\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 1367, in https_open\n    return self.do_open(http.client.HTTPSConnection, req,\n           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                        context=self._context)\n                        ^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/python/lib/python3.13/urllib/request.py\", line 1322, in do_open\n    raise URLError(err)\nurllib.error.URLError: <urlopen error Tunnel connection failed: 403 Forbidden>\nnodeenv installation failed; You may want to try installing `nodejs-bin` as it is more reliable.\nTraceback (most recent call last):\n  File \"/opt/litellm/bin/prisma\", line 6, in <module>\n    sys.exit(main())\n             ~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/cli.py\", line 39, in main\n    sys.exit(prisma.run(args[1:]))\n             ~~~~~~~~~~^^^^^^^^^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/prisma.py\", line 37, in run\n    process = node.run(\n              ^^^^^^^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/_proxy.py\", line 19, in __getattr__\n    return getattr(self.__get_proxied__(), attr)\n                   ~~~~~~~~~~~~~~~~~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/_proxy.py\", line 35, in __get_proxied__\n    self.__proxied = proxied = self.__load__()\n                               ~~~~~~~~~~~~~^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py\", line 406, in __load__\n    return resolve(self.target)\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py\", line 282, in resolve\n    return NodeBinaryStrategy.resolve(target)\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py\", line 161, in resolve\n    return NodeBinaryStrategy.from_nodeenv(target)\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py\", line 191, in from_nodeenv\n    raise exc\n  File \"/opt/litellm/lib/python3.13/site-packages/prisma/cli/_node.py\", line 174, in from_nodeenv\n    subprocess.run(\n    ~~~~~~~~~~~~~~^\n        [\n        ^\n    ...<8 lines>...\n        stderr=sys.stderr,\n        ^^^^^^^^^^^^^^^^^^\n    )\n    ^\n  File \"/opt/python/lib/python3.13/subprocess.py\", line 577, in run\n    raise CalledProcessError(retcode, process.args,\n                             output=stdout, stderr=stderr)\nsubprocess.CalledProcessError: Command '['/opt/litellm/bin/python3', '-m', 'nodeenv', '/home/nonroot/.cache/prisma-python/nodeenv']' returned non-zero exit status 1.\n, e: {'x86': False, 'risc': False, 'lts': False}\n", "level": "INFO", "timestamp": "2026-03-25T08:12:57.717352", "x86": false, "risc": false, "lts": false}

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.82

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

To resolve the issue of LiteLLM trying to download Node.js when initializing the database in an air-gapped environment, follow these steps:

  • Disable Node.js download: Modify the nodeenv configuration to prevent it from downloading Node.js. This can be done by setting the NODEENV_CACHE_DIR environment variable to a local directory where Node.js is already installed.
  • Use a local Node.js installation: Ensure that Node.js is installed locally on the system and configure nodeenv to use this installation instead of downloading it from the internet.
  • Update prisma configuration: Update the prisma configuration to use the local Node.js installation.

Example code to set the NODEENV_CACHE_DIR environment variable:

import os

# Set the NODEENV_CACHE_DIR environment variable
os.environ['NODEENV_CACHE_DIR'] = '/path/to/local/nodejs/installation'

Alternatively, you can also set this environment variable in your Dockerfile:

ENV NODEENV_CACHE_DIR=/path/to/local/nodejs/installation

Verification

To verify that the fix worked, check the LiteLLM logs for any errors related to Node.js download. You can also check the nodeenv cache directory to ensure that it is using the local Node.js installation.

Extra Tips

  • Ensure that the local Node.js installation is compatible with the version required by LiteLLM.
  • If you are using a Docker container, make sure to update the Dockerfile to reflect the changes.
  • Consider implementing a proxy server to cache Node.js downloads and reduce the load on your air-gapped environment.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING