Skip to content

Document installing and running Vite+ on machines with no internet access #3296

Closed

Description

@ReemX

Documentation is

Missing

Explain in Detail

Our build agents and deploy servers are Windows machines with no internet. Everything installs from a private npm registry (Verdaccio) where we mirror each package by hand, including every platform-specific native binary. So for each Vite+ upgrade we need to know exactly which packages to mirror, and whether anything reaches out to the internet at runtime.

What we worked out ourselves for 1.4.0 on win32-x64, using only the local CLI from node_modules:

  • vite-plus pulls @voidzero-dev/vite-plus-win32-x64-msvc, @oxlint/binding-win32-x64-msvc, @oxfmt/binding-win32-x64-msvc and @oxlint-tsgolint/win32-x64 through optional dependencies of vite-plus, oxlint, oxfmt and oxlint-tsgolint. @voidzero-dev/vite-plus-core adds lightningcss and the platform list again.
  • With proxies and NPM_CONFIG_REGISTRY pointed at a dead port, vp lint, vp fmt --check, vp check --no-lint and a cached vp run all worked. That's not a real isolated-network test, so we can't be sure nothing else is fetched (for example by vp test or vp create).
  • The global installer and vp env need the npm registry and Node.js downloads. NPM_CONFIG_REGISTRY and VP_NODE_DIST_MIRROR cover that. VP_LOCAL_TGZ and VP_LOCAL_BINARY look like they would allow a fully offline global install, but the docs list them as development variables.

Your Suggestion for Changes

A short "offline / private registry" section, maybe in guide/global-cli.md or guide/ci.md, that says:

  • which commands of the local CLI may touch the network, if any;
  • the native packages per platform for a release (or where to read them, e.g. a field in the published toolchain.json);
  • whether VP_LOCAL_TGZ / VP_LOCAL_BINARY are supported for offline global installs or should be avoided.

Relevant Page

https://viteplus.dev/guide/global-cli and https://viteplus.dev/guide/ci

Activity

  1. voidzero-bot commented on Oct 31, 2026

    @voidzero-bot
  2. voidzero-bot commented on Nov 21, 2026

    @voidzero-bot
  3. fengmk2 commented on Nov 21, 2026

    @fengmk2
    Member

    @ReemX Vite+ also installs the Node binary. Do you also have a dedicated download site configuration for this?

  4. self-assigned this
    on Nov 21, 2026
  5. fengmk2 commented on Nov 21, 2026

    @fengmk2
    Member

    @ReemX, I opened draft PR #3520 with a Windows example for installing the project-local CLI from Verdaccio. It also explains how to find the native packages to mirror for each release and which commands may still try to download something.

    Does this cover how you install and run Vite+ on your Windows build agents without public internet access? If a step is missing, could you point out where you’d need more detail?

  6. ReemX commented on Nov 21, 2026

    @ReemX
    ContributorAuthor

    Thanks for writing this up so fast.

    On Node: no, we have no Node.js mirror. IT installs Node once per machine from the official Windows installer, and pnpm comes from Verdaccio with npm install -g pnpm. We don't plan to use the global vp or vp env on those machines, only the project-local CLI from node_modules. So the CI section of #3520 is the one that matters for us, and its approach works: on a clean Windows x64 project with [email protected] and pnpm 12.18.0, pnpm list --lockfile-only --depth Infinity --json listed every native package we mirror, including the two new ones in 1.7.0 (@tsrs/win32-x64 and @yuku-core/binding-win32-x64).

    One thing the draft understates. I pointed the registry at a local server that logs requests and started with an empty Vite+ cache (VP_HOME set to an empty folder, pnpm 12.18.0 on PATH):

    • Every command I tried requested @pnpm/exe.win32-x64/12.18.0, not only vp lint and vp test: vp fmt --check, vp check, vp test run and vp run build all did, 4 requests each. vp --version didn't.
    • If the registry refuses quickly (503), each command still succeeds, about 5 s slower.
    • If the registry or proxy accepts the connection and never answers, which is common on our network, each request waits for the 2-minute request timeout. vp fmt --check on two files took 486 s and then passed.
    • @pnpm/exe.win32-x64 isn't in the pnpm list --lockfile-only output (pnpm 12 records it under packageManagerDependencies), so a mirror built from the lockfile steps in the draft won't have it.
    • VP_ENV_FORBIDDEN=1 avoids the requests on 1.7.0: vp lint, vp check, vp test run and vp run build made none and passed. vp install then refuses ("does not manage pnpm"), which is fine for us since we run pnpm install directly.

    I read that #3386 removes the download for the local CLI when there's no global install, so this goes away in the next release. Until then, it might help to say in the 1.7.0 note that it applies to every command and to mention VP_ENV_FORBIDDEN=1, or mirroring @pnpm/exe.<platform> for the pinned version.

    With that, the PR covers what we need.

  7. fengmk2 commented on Nov 21, 2026

    @fengmk2
    Member

    @ReemX, thanks for testing this on Windows x64 and sharing the request logs. I updated draft PR #3520 with the VP_ENV_FORBIDDEN=1 workaround you verified. It lets you keep using pnpm install directly and prevents vp from trying to download pnpm. Starting with 1.8.0, your project-local CLI will use pnpm from PATH without that setting.

    Could you take another look at the offline CI section and let us know if it covers your Verdaccio setup?

  8. ReemX commented on Nov 21, 2026

    @ReemX
    ContributorAuthor

    @fengmk2 yes, that covers our setup. I re-ran the offline CI section as written on Windows x64 with pnpm 12.16.1, a fresh VP_HOME for every command and the registry pointed at a server that logs requests:

    • Without VP_ENV_FORBIDDEN, vp fmt --check, vp lint, vp check, vp test run and vp run build each made 4 requests for @pnpm/exe.win32-x64. Same on 1.6.0 and 1.7.0, so the "1.6.x and 1.7.x" scope in the tip is right.
    • With VP_ENV_FORBIDDEN=1 all of them made zero requests. Against a registry that accepts the connection and never answers, they finished in about a second instead of hanging.
    • vp install with the variable set stops with Vite+ does not manage pnpm, as the tip says, and pnpm install --frozen-lockfile followed by .\node_modules\.bin\vp.cmd check works.

    One small suggestion: the last paragraph under "Which commands can use the network?" describes the stall but not the fix. Someone who lands on that section from search could miss the tip above it, so a closing sentence like "On 1.6.x and 1.7.x, set VP_ENV_FORBIDDEN=1 to skip this lookup." would help.

    Thanks, this is what we needed for our build agents.

  9. added a commit that references this issue on Nov 22, 2026
    286f320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Fields

Priority

None yet

Effort

None yet

Target date

None yet

Start date

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions