-
Notifications
You must be signed in to change notification settings - Fork 119
Description
Describe the bug
When I ran the installation script in a WSL2 environment where Zscaler certificates were installed, an error occurred.
After checking the error details, it appeared that running vp install failed to retrieve the Node.js runtime list from https://nodejs.org/dist/index.json.
Since TLS communication worked correctly with curl and other programs, I suspected that the certificates were not being referenced properly. While reviewing the repository, I found the following:
- The reqwest version is 0.12
Line 140 in 9db93c2
reqwest = { version = "0.12", default-features = false } - The enabled reqwest features are ["stream", "rustls-tls", "json"]
vite-plus/crates/vite_install/Cargo.toml
Lines 39 to 40 in 9db93c2
[target.'cfg(not(target_os = "windows"))'.dependencies] reqwest = { workspace = true, features = ["stream", "rustls-tls", "json"] } - In reqwest 0.12, specifying rustls-tls does not use the system’s CA certificates
SSL_CERT_FILEvsfeature=["rustls-tls"]- how to use? seanmonstar/reqwest#2640 - In reqwest 0.13, the handling of root certificates has been reorganized
https://seanmonstar.com/blog/reqwest-v013-rustls-default/
As for possible fixes, I believe the options are either adjusting the feature flags while staying on reqwest 0.12, or upgrading to reqwest 0.13.
Reproduction
To reproduce this, you need to introduce a MITM proxy such as Zscaler on the network side, rather than relying on the contents of a repository.
Steps to reproduce
Run vp install under any MITM proxy.
System Info
❯ ~/watiko/.vite-plus/0.1.12/bin/vp env current
VITE+ - The Unified Toolchain for the Web
error: Failed to download Node.js runtime: Failed to download from https://nodejs.org/dist/index.json: error sending request for url (https://nodejs.org/dist/index.json)
❯ ~/watiko/.vite-plus/0.1.12/bin/vp --version
VITE+ - The Unified Toolchain for the Web
vp v0.1.12
Local vite-plus:
vite-plus Not found
Tools:
vite Not found
rolldown Not found
vitest Not found
oxfmt Not found
oxlint Not found
oxlint-tsgolint Not found
tsdown Not found
Environment:
Package manager Not found
Node.js Not found
error: Failed to download Node.js runtime: Failed to download from https://nodejs.org/dist/index.json: error sending request for urlhttps://nodejs.org/dist/index.json)Used Package Manager
pnpm
Logs
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority
Effort