nodeenv
nodeenv copied to clipboard
Failed to download node at environment creation
I'm working on a Windows machine which is behind a company proxy and have a bunch of self signed certificates in the Windows certificate store.
I've recently tried to use pyright
on a project which is using nodeenv
behind the scene to download node. However, as soon as I try to run pyright
it fails with an error indicating that it failed downloading node.
I've tried to installed nodeenv
and use it directly but I end up with the exact same error. I think this is caused by the proxy/certificates stuff of my company. I've tried to use the without_ssl = True
in a ~/.nodeenvrc
file and also passing the --ignore_ssl_certs
without any success (I've tried all combinations of those options).
nodeenv env --ignore_ssl_certs --verbose
* Install prebuilt node (20.4.0) .Failed to download from https://nodejs.org/download/release/v20.4.0/node-v20.4.0-win-x64.zip
..
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\TBEBGOD\Developement\myrepo\.venv\Scripts\nodeenv.EXE\__main__.py", line 7, in <module>
File "C:\Users\TBEBGOD\Developement\myrepo\.venv\Lib\site-packages\nodeenv.py", line 1122, in main
create_environment(env_dir, args)
File "C:\Users\TBEBGOD\Developement\myrepo\.venv\Lib\site-packages\nodeenv.py", line 998, in create_environment
install_node(env_dir, src_dir, args)
File "C:\Users\TBEBGOD\Developement\myrepo\.venv\Lib\site-packages\nodeenv.py", line 755, in install_node
install_node_wrapped(env_dir, src_dir, args)
File "C:\Users\TBEBGOD\Developement\myrepo\.venv\Lib\site-packages\nodeenv.py", line 790, in install_node_wrapped
copy_node_from_prebuilt(env_dir, src_dir, args.node)
File "C:\Users\TBEBGOD\Developement\myrepo\.venv\Lib\site-packages\nodeenv.py", line 681, in copy_node_from_prebuilt
src_folder, = glob.glob(src_folder_tpl)
^^^^^^^^^^^
ValueError: not enough values to unpack (expected 1, got 0)
This might be not a bug from nodeenv actually but I'm not sure what I can do from here.
nodeenv
version: 1.8.0
python
version: 3.10.11
System info
{
"implementation_name": "cpython",
"implementation_version": "3.10.11",
"os_name": "nt",
"platform_machine": "AMD64",
"platform_release": "10",
"platform_system": "Windows",
"platform_version": "10.0.19044",
"python_full_version": "3.10.11",
"platform_python_implementation": "CPython",
"python_version": "3.10",
"sys_platform": "win32"
}