Skip to content

Unable to deploy at offline environment. Cannot find package 'vite' #3317

@LifeJustDLC

Description

@LifeJustDLC
pnpm run dev

> @ dev C:\Users\WDAGUtilityAccount\Desktop\Sandbox\vue-docs-main
> vitepress

node:internal/modules/package_json_reader:314
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
        ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from C:\Users\WDAGUtilityAccount\Desktop\Sandbox\vue-docs-main\node_modules\vitepress\dist\node\cli.js
    at Object.getPackageJSONURL (node:internal/modules/package_json_reader:314:9)
    at packageResolve (node:internal/modules/esm/resolve:767:81)
    at moduleResolve (node:internal/modules/esm/resolve:853:18)
    at defaultResolve (node:internal/modules/esm/resolve:983:11)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:731:20)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:310:38)
    at ModuleJob._link (node:internal/modules/esm/module_job:182:49) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v22.21.1
 ELIFECYCLE  Command failed with exit code 1.

The exact same folder, running pnpm run dev outside windows sandbox is good, running inside ends up this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions