Repository navigation
Closed
Description
Describe the bug
There are two packages A and B in the project. Package A depends on Package B, so package B needs to be built first. The following error occurred when running the command vp -F B build.
Reproduction
Steps to reproduce
1.clone project
2.run vp install
3.run utils build vp run --filter utils
error: Failed to load task graph
* Failed to load task config file for package at "/vp-run-bug-report/apps/website"
* Failed to resolve vite config: GenericFailure, Error: Build failed with 1 error:System Info
VITE+ - The Unified Toolchain for the Web
Environment:
Version 24.16.0
Source engines.node
Source Path /Users/zhouhl/Code/vp-run-bug-report/package.json
Project Root /Users/zhouhl/Code/vp-run-bug-report
Tool Paths:
node /Users/zhouhl/.vite-plus/js_runtime/node/24.16.0/bin/node
npm /Users/zhouhl/.vite-plus/js_runtime/node/24.16.0/bin/npm
npx /Users/zhouhl/.vite-plus/js_runtime/node/24.16.0/bin/npx
Package Manager:
Name pnpm
Version 11.4.0
Source packageManager
Source Path /Users/zhouhl/Code/vp-run-bug-report/package.json
Project Root /Users/zhouhl/Code/vp-run-bug-report
Bin Path /Users/zhouhl/.vite-plus/package_manager/pnpm/11.4.0/pnpm/bin/pnpm
VITE+ - The Unified Toolchain for the Web
vp v0.1.23
Local vite-plus:
vite-plus v0.1.22
Tools:
vite v8.0.11
rolldown v1.0.0
vitest v4.1.6
oxfmt v0.48.0
oxlint v1.63.0
oxlint-tsgolint v0.22.1
tsdown v0.22.0
Environment:
Package manager pnpm v11.4.0
Node.js v24.16.0 (engines.node)Used Package Manager
pnpm
Logs
VITE+ - The Unified Toolchain for the Web
failed to load config from /Users/zhouhl/Code/vp-run-bug-report/apps/website/vite.config.ts
[Vite+] resolve universal vite config error: Error: Build failed with 1 error:
[plugin externalize-deps]
Error: Failed to resolve entry for package "utils". The package may have incorrect main/module/exports specified in its package.json.
at packageEntryFailure (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:37962:30)
at resolvePackageEntry (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:37959:2)
at tryNodeResolve (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:37858:70)
at nodeResolveWithVite (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:38067:9)
at PluginContextImpl.handler (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:40268:18)
at plugin (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/rolldown/shared/bindingify-input-options-wZdDRbfo.mjs:1092:30)
at plugin.<computed> (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/rolldown/shared/bindingify-input-options-wZdDRbfo.mjs:1625:18)
at aggregateBindingErrorsIntoJsError (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/rolldown/shared/error-BrnLyQ-g.mjs:48:18)
at unwrapBindingResult (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/rolldown/shared/error-BrnLyQ-g.mjs:18:128)
at #build (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/rolldown/shared/rolldown-build-CNhzgsn2.mjs:3257:34)
at async bundleConfigFile (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:40318:17)
at async bundleAndLoadConfigFile (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:40226:18)
at async loadConfigFromFile (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:40195:42)
at async resolveConfig (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:39820:22)
at async resolveUniversalViteConfig (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]_@types+node_752acc04aa950ebaa464ce104aebe367/node_modules/vite-plus/dist/resolve-vite-config-C5AjksTj.js:70:18) {
errors: [Getter/Setter]
}
error: Failed to load task graph
* Failed to load task config file for package at "/Users/zhouhl/Code/vp-run-bug-report/apps/website"
* Failed to resolve vite config: GenericFailure, Error: Build failed with 1 error:
[plugin externalize-deps]
Error: Failed to resolve entry for package "utils". The package may have incorrect main/module/exports specified in its package.json.
at packageEntryFailure (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:37962:30)
at resolvePackageEntry (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:37959:2)
at tryNodeResolve (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:37858:70)
at nodeResolveWithVite (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:38067:9)
at PluginContextImpl.handler (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/vite/node/chunks/node.js:40268:18)
at plugin (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/rolldown/shared/bindingify-input-options-wZdDRbfo.mjs:1092:30)
at plugin.<computed> (file:///Users/zhouhl/Code/vp-run-bug-report/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@voidzero-dev/vite-plus-core/dist/rolldown/shared/bindingify-input-options-wZdDRbfo.mjs:1625:18)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.
Activity
fengmk2 commentedon May 29, 2026
https://github.com/Mario34/vp-run-bug-report/blob/main/apps/website/vite.config.ts#L2 The vite.config.ts in
apps/websitedepends on utils withimport utils from "utils";. This utils dependency must be compiled before it can be successfully resolved.This is indeed a problem. cc @wan9chi
wan9chi commentedon May 29, 2026
The other contributing factor is that
vite.config.tsusesmergeConfig, which disables the static task config extraction.liangmiQwQ commentedon Oct 25, 2026
For
vp run a#build, currently Vite Task builds the whole task map, runningload_user_config_file()for every sub-package but what we only needed only is packagea's plugin.I'm not sure if this should be fixed by modifying
static_config. In my opinion,static_config's analyze behavior should be the completely same as dynamic config.Also, the performance cost: voidzero-dev/vite-task#886
Ref: #2075
ReemX commentedon Oct 31, 2026
We hit the same thing trying
vp run(1.4.0) on our monorepo, and for us it blocks every run on a clean checkout, not just one package.Our three frontends'
vite.config.tsall import a shared workspace package,@configs/vite-config, whoseexports.defaultis./dist/index.js(built withtsc). Running a filter that doesn't include any frontend still fails:IndexedTaskGraph::load(vite-taskvt_graph/src/lib.rs) loads every package's config in its first pass and returns on the first error, before the filter applies. So the package that would build@configs/vite-configcan't run either. With Turborepo^buildbuilds it first, since turbo never evaluates the vite config. Building it once with turbo gotvp runworking for us.Two things that would cover our case: load configs only for the packages a run selects, or have a config load failure in a package without
runtasks skip that package with a warning instead of failing the graph.wan9chi commentedon Nov 6, 2026
Fixed by voidzero-dev/vite-task#944, which now only loads the configs of packages the run needs.