question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent Metadata errors

See original GitHub issue

Describe 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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:12
  • Comments:24 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
Geebroxcommented, Apr 12, 2022

The issue seems related to esbuild

A temporary workaround is to add resolution to your package.json:

"resolutions": {
  "esbuild": "0.14.34"
}
3reactions
Abeivcommented, Apr 12, 2022

The issue seems related to esbuild

A temporary workaround is to add resolution to your package.json:

"resolutions": {
  "esbuild": "0.14.34"
}

Thank man 👍!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found