Inconsistent Metadata errors
See original GitHub issueDescribe the bug
I get this when starting my dev server
✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/vue/dist/vue.runtime.esm-bundler.js" when it was imported here:
node_modules/vue-router/dist/vue-router.esm-bundler.js:6:187:
6 │ ...eactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';
╵ ~~~~~
The original metadata for that path comes from when it was imported here:
dep:vue:2:14:
2 │ export * from "./node_modules/vue/dist/vue.runtime.esm-bundler.js"
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The difference in metadata is displayed below:
{
- "pluginName": null,
+ "pluginName": "vite:dep-pre-bundle",
}
This is a bug in the "vite:dep-pre-bundle" plugin. Plugins provide metadata for a given path in an "onResolve" callback. All metadata provided for the same path must be consistent to ensure deterministic builds. Due to parallelism, one set of provided metadata will be randomly chosen for a given path, so providing inconsistent metadata for the same path can cause non-determinism.
Possible duplicate of https://github.com/vitejs/vite/issues/7683
Reproduction
https://stackblitz.com/edit/vitejs-vite-f48pac?file=package.json
System Info
System:
OS: macOS 12.0.1
CPU: (8) arm64 Apple M1
Memory: 95.61 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.volta/tools/image/node/16.13.1/bin/node
Yarn: 1.22.17 - ~/.volta/tools/image/yarn/1.22.17/bin/yarn
npm: 8.6.0 - ~/.volta/tools/image/npm/8.6.0/bin/npm
Browsers:
Chrome: 100.0.4896.75
Safari: 15.1
npmPackages:
@vitejs/plugin-vue: ^2.3.1 => 2.3.1
vite: ^2.9.1 => 2.9.1
Used Package Manager
yarn
Logs
vite:resolve 0.31ms @vue/runtime-dom -> /Users/k/fume/tailvue/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0ms
vite:resolve 0.41ms vue -> /Users/k/fume/tailvue/node_modules/vue/dist/vue.runtime.esm-bundler.js +3ms
✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/vue/dist/vue.runtime.esm-bundler.js" when it was imported here:
node_modules/@iconify/vue/dist/iconify.mjs:1:35:
1 │ import { h, defineComponent } from 'vue';
╵ ~~~~~
The original metadata for that path comes from when it was imported here:
dep:vue:2:14:
2 │ export * from "../node_modules/vue/dist/vue.runtime.esm-bundler.js"
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The difference in metadata is displayed below:
{
- "pluginName": null,
+ "pluginName": "vite:dep-pre-bundle",
}
This is a bug in the "vite:dep-pre-bundle" plugin. Plugins provide metadata for a given path in an
"onResolve" callback. All metadata provided for the same path must be consistent to ensure
deterministic builds. Due to parallelism, one set of provided metadata will be randomly chosen for
a given path, so providing inconsistent metadata for the same path can cause non-determinism.
vite:resolve 0.33ms @vue/runtime-core -> /Users/k/fume/tailvue/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +1ms
vite:resolve 0.27ms @vue/shared -> /Users/k/fume/tailvue/node_modules/@vue/shared/dist/shared.esm-bundler.js +0ms
vite:resolve 0.39ms @vue/reactivity -> /Users/k/fume/tailvue/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +10ms
11:03:58 PM [vite] error while updating dependencies:
Error: Build failed with 1 error:
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created a year ago
- Reactions:12
- Comments:24 (2 by maintainers)
Top Results From Across the Web
Linked SQL Server database giving "inconsistent metadata ...
I've had this happen a few times. The one workaround I found was to use OPENQUERY. SELECT * FROM OPENQUERY(LinkedServerName, 'SELECT * FROM...
Read more >OLE DB Provider for DB2 returns an "inconsistent metadata ...
Fixes a problem in which the OLE DB Provider for DB2 returns an "inconsistent metadata" error when it runs a query for an...
Read more >How to Fix Inconsistent Metadata Errors - SQLServerCentral
Why does changing a table on a SQL Server 7.0 server cause "OLE DB provider 'SQLOLEDB' supplied inconsistent metadata.
Read more >Fixing Inconsistencies in the Metadata - MicroStrategy
Object Type Object Classification Object Description
‑1 DssTypeUnknown The type of object is not specified
0 DssTypeReserved None
1 DssTypeFilter Filter
Read more >Linked Server query fails due to inconsistent metadata
Executing a SQL query against an OpenEdge database via a Microsoft SQL Server Linked Server fails due to inconsistent metadata. Error ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue seems related to
esbuild
A temporary workaround is to add
resolution
to your package.json:Thank man 👍!