Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esbuild0.14.35 is not compate with vite #7683

Closed
7 tasks done
agileago opened this issue Apr 12, 2022 · 28 comments
Closed
7 tasks done

esbuild0.14.35 is not compate with vite #7683

agileago opened this issue Apr 12, 2022 · 28 comments

Comments

@agileago
Copy link

agileago commented Apr 12, 2022

Describe the bug

vite: latest
esbuild: 0.14.35

✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/.pnpm/tslib@2.3.1/node_modules/tslib/tslib.es6.js" when it was imported here:

    node_modules/.pnpm/injection-js@2.4.0/node_modules/injection-js/util/decorators.js:8:31:
      8 │ import { __spreadArrays } from "tslib";
        ╵                                ~~~~~~~

  The original metadata for that path comes from when it was imported here:

    dep:tslib:2:14:
      2 │ export * from "./node_modules/.pnpm/tslib@2.3.1/node_modules/tslib/tslib.es6.js"
        ╵               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  The difference in metadata is displayed below:
  
   {
  -  "pluginName": null,
  -  "sideEffects": true,
  +  "pluginName": "vite:dep-pre-bundle",
  +  "sideEffects": false,
   }
  
  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.

Reproduction

https://github.com/agileago/fe-template

System Info

System:
    OS: macOS 12.2.1
    CPU: (4) x64 Intel(R) Core(TM) i5-7600 CPU @ 3.50GHz
    Memory: 426.07 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.9.0 - /usr/local/bin/node
    Yarn: 1.22.17 - ~/.config/yarn/global/node_modules/.bin/yarn
    npm: 8.5.5 - /usr/local/bin/npm
  Browsers:
    Chrome: 100.0.4896.75
    Edge: 100.0.1185.39
    Safari: 15.3
  npmPackages:
    @vitejs/plugin-vue: ^2.3.0 => 2.3.1 
    vite: 2.9.1 => 2.9.1

Used Package Manager

pnpm

Logs

vite:config bundled config file loaded in 376.98ms +0ms
  vite:config using resolved config: {
  vite:config   plugins: [
  vite:config     'vite:pre-alias',
  vite:config     'alias',
  vite:config     'vite:modulepreload-polyfill',
  vite:config     'vite:resolve',
  vite:config     'vite:optimized-deps',
  vite:config     'vite:html-inline-proxy',
  vite:config     'vite:css',
  vite:config     'vite:esbuild',
  vite:config     'vite:json',
  vite:config     'vite:wasm',
  vite:config     'vite:worker',
  vite:config     'vite:asset',
  vite:config     'vite:vue-jsx',
  vite:config     'vite:define',
  vite:config     'vite:css-post',
  vite:config     'vite:worker-import-meta-url',
  vite:config     'vite:client-inject',
  vite:config     'vite:import-analysis'
  vite:config   ],
  vite:config   server: {
  vite:config     preTransformRequests: true,
  vite:config     fs: { strict: true, allow: [Array], deny: [Array] }
  vite:config   },
  vite:config   esbuild: { include: /\.esbuild\./ },
  vite:config   define: { __VUE_OPTIONS_API__: true, __VUE_PROD_DEVTOOLS__: false },
  vite:config   configFile: '/Users/titanmatrix/Desktop/vite-react/vite.config.ts',
  vite:config   configFileDependencies: [ '/Users/titanmatrix/Desktop/vite-react/vite.config.ts' ],
  vite:config   inlineConfig: {
  vite:config     root: undefined,
  vite:config     base: undefined,
  vite:config     mode: undefined,
  vite:config     configFile: undefined,
  vite:config     logLevel: undefined,
  vite:config     clearScreen: undefined,
  vite:config     server: {}
  vite:config   },
  vite:config   root: '/Users/titanmatrix/Desktop/vite-react',
  vite:config   base: '/',
  vite:config   resolve: { dedupe: undefined, alias: [ [Object], [Object] ] },
  vite:config   publicDir: '/Users/titanmatrix/Desktop/vite-react/public',
  vite:config   cacheDir: '/Users/titanmatrix/Desktop/vite-react/node_modules/.vite',
  vite:config   command: 'serve',
  vite:config   mode: 'development',
  vite:config   isWorker: false,
  vite:config   isProduction: false,
  vite:config   build: {
  vite:config     target: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
  vite:config     polyfillModulePreload: true,
  vite:config     outDir: 'dist',
  vite:config     assetsDir: 'assets',
  vite:config     assetsInlineLimit: 4096,
  vite:config     cssCodeSplit: true,
  vite:config     cssTarget: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
  vite:config     sourcemap: false,
  vite:config     rollupOptions: {},
  vite:config     minify: 'esbuild',
  vite:config     terserOptions: {},
  vite:config     write: true,
  vite:config     emptyOutDir: null,
  vite:config     manifest: false,
  vite:config     lib: false,
  vite:config     ssr: false,
  vite:config     ssrManifest: false,
  vite:config     reportCompressedSize: true,
  vite:config     chunkSizeWarningLimit: 500,
  vite:config     watch: null,
  vite:config     commonjsOptions: { include: [Array], extensions: [Array] },
  vite:config     dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] }
  vite:config   },
  vite:config   preview: {
  vite:config     port: undefined,
  vite:config     strictPort: undefined,
  vite:config     host: undefined,
  vite:config     https: undefined,
  vite:config     open: undefined,
  vite:config     proxy: undefined,
  vite:config     cors: undefined,
  vite:config     headers: undefined
  vite:config   },
  vite:config   env: { BASE_URL: '/', MODE: 'development', DEV: true, PROD: false },
  vite:config   assetsInclude: [Function: assetsInclude],
  vite:config   logger: {
  vite:config     hasWarned: false,
  vite:config     info: [Function: info],
  vite:config     warn: [Function: warn],
  vite:config     warnOnce: [Function: warnOnce],
  vite:config     error: [Function: error],
  vite:config     clearScreen: [Function: clearScreen],
  vite:config     hasErrorLogged: [Function: hasErrorLogged]
  vite:config   },
  vite:config   packageCache: Map(0) {},
  vite:config   createResolver: [Function: createResolver],
  vite:config   optimizeDeps: {
  vite:config     esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
  vite:config   },
  vite:config   worker: {
  vite:config     format: 'iife',
  vite:config     plugins: [
  vite:config       [Object], [Object],
  vite:config       [Object], [Object],
  vite:config       [Object], [Object],
  vite:config       [Object], [Object],
  vite:config       [Object], [Object],
  vite:config       [Object], [Object],
  vite:config       [Object], [Object],
  vite:config       [Object], [Object],
  vite:config       [Object]
  vite:config     ],
  vite:config     rollupOptions: {}
  vite:config   }
  vite:config } +5ms
Port 3000 is in use, trying another one...

  vite v2.9.1 dev server running at:

  > Local: http://localhost:3001/
  > Network: use `--host` to expose

  ready in 599ms.

  vite:deps scanning for dependencies... { timestamp: true } +0ms
  vite:deps Crawling dependencies using entries:
  vite:deps   /Users/titanmatrix/Desktop/vite-react/index.html +0ms
  vite:resolve 0.62ms /src/main.tsx -> /Users/titanmatrix/Desktop/vite-react/src/main.tsx +0ms
  vite:resolve 11.85ms @abraham/reflection -> /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/@abraham+reflection@0.10.0/node_modules/@abraham/reflection/dist/index.js +22ms
  vite:resolve 2.76ms vue -> /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/vue@3.2.31/node_modules/vue/dist/vue.runtime.esm-bundler.js +4ms
  vite:resolve 2.02ms vue3-oop -> /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/vue3-oop@0.5.2_56f444cfeb3af04c1b6e7a04c19810cc/node_modules/vue3-oop/dist/vue3-oop.es.js +3ms
  vite:deps Scan completed in 85.19ms: {
  '@abraham/reflection': '/Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/@abraham+reflection@0.10.0/node_modules/@abraham/reflection/dist/index.js',
  vue: '/Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/vue@3.2.31/node_modules/vue/dist/vue.runtime.esm-bundler.js',
  'vue3-oop': '/Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/vue3-oop@0.5.2_56f444cfeb3af04c1b6e7a04c19810cc/node_modules/vue3-oop/dist/vue3-oop.es.js'
} +66ms
  vite:deps dependencies found: @abraham/reflection
  vite:deps   vue
  vite:deps   vue3-oop { timestamp: true } +99ms
  vite:resolve 7.82ms @vue/runtime-dom -> /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/@vue+runtime-dom@3.2.31/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0ms
  vite:resolve 1.74ms vue -> /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/vue@3.2.31/node_modules/vue/dist/vue.runtime.esm-bundler.js +2ms
  vite:resolve 0.92ms injection-js -> /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/injection-js@2.4.0/node_modules/injection-js/index.js +2ms
✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/.pnpm/vue@3.2.31/node_modules/vue/dist/vue.runtime.esm-bundler.js" when it was imported here:

    node_modules/.pnpm/vue3-oop@0.5.2_56f444cfeb3af04c1b6e7a04c19810cc/node_modules/vue3-oop/dist/vue3-oop.es.js:32:294:
      32 │ ...onUnmounted, onBeforeUnmount, onUpdated, onBeforeUpdate, onMounted, onBeforeMount, provide, markRaw } from "vue";~~~~~

  The original metadata for that path comes from when it was imported here:

    dep:vue:2:14:
      2 │ export * from "./node_modules/.pnpm/vue@3.2.31/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 5.08ms @vue/runtime-core -> /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/@vue+runtime-core@3.2.31/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +7ms
  vite:resolve 1.59ms @vue/shared -> /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/@vue+shared@3.2.31/node_modules/@vue/shared/dist/shared.esm-bundler.js +3ms
  vite:resolve 2.58ms tslib -> /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/tslib@2.3.1/node_modules/tslib/tslib.es6.js +33ms
  vite:resolve 1.41ms @vue/reactivity -> /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/@vue+reactivity@3.2.31/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +14ms
11:35:17 [vite] error while updating dependencies:
Error: Build failed with 1 error:
node_modules/.pnpm/vue3-oop@0.5.2_56f444cfeb3af04c1b6e7a04c19810cc/node_modules/vue3-oop/dist/vue3-oop.es.js:32:294: ERROR: [plugin: vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/.pnpm/vue@3.2.31/node_modules/vue/dist/vue.runtime.esm-bundler.js" when it was imported here:
    at failureErrorWithLog (/Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/esbuild@0.14.35/node_modules/esbuild/lib/main.js:1603:15)
    at /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/esbuild@0.14.35/node_modules/esbuild/lib/main.js:1249:28
    at runOnEndCallbacks (/Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/esbuild@0.14.35/node_modules/esbuild/lib/main.js:1034:63)
    at buildResponseToResult (/Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/esbuild@0.14.35/node_modules/esbuild/lib/main.js:1247:7)
    at /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/esbuild@0.14.35/node_modules/esbuild/lib/main.js:1356:14
    at /Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/esbuild@0.14.35/node_modules/esbuild/lib/main.js:666:9
    at handleIncomingPacket (/Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/esbuild@0.14.35/node_modules/esbuild/lib/main.js:763:9)
    at Socket.readFromStdout (/Users/titanmatrix/Desktop/vite-react/node_modules/.pnpm/esbuild@0.14.35/node_modules/esbuild/lib/main.js:632:7)
    at Socket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:324:12)

Validations

@songjiachao
Copy link

same problem

@sapphi-red
Copy link
Member

vite: latest
esbuild: 0.14.15

You are not using latest version (2.9.1) of vite. You are using 2.8.6.
https://github.com/agileago/fe-template/blob/be30a822634cf37ac825a4c58c30377748370852/pnpm-lock.yaml#L6371
Also you are not using esbuild 0.14.15. You are using 0.14.26.
https://github.com/agileago/fe-template/blob/be30a822634cf37ac825a4c58c30377748370852/pnpm-lock.yaml#L2542

@agileago
Copy link
Author

yes. when i update package and i find error.i dont push it

@agileago agileago changed the title esbuild0.14.15 is not compate with vite esbuild0.14.35 is not compate with vite Apr 12, 2022
@sapphi-red
Copy link
Member

Please write how to reproduce the error. It is unclear how to reproduce.

@maoxiaoke
Copy link

Lock esbuild to version 0.14.34. It's likely esbuild had a breakchange.

@taomas
Copy link

taomas commented Apr 12, 2022

same error,when i use "vite": "~2.7.1" to replace "vite": "~2.7.1", the question resolved.

@sapphi-red
Copy link
Member

Lock esbuild to version 0.14.34. It's likely esbuild had a breakchange.

Looks like this one is affecting.

  • Validate that path metadata returned by plugins is consistent

    The plugin API assumes that all metadata for the same path returned by a plugin's onResolve callback is consistent. Previously this assumption was just assumed without any enforcement. Starting with this release, esbuild will now enforce this by generating a build error if this assumption is violated. The lack of validation has not been an issue (I have never heard of this being a problem), but it still seems like a good idea to enforce it. Here's a simple example of a plugin that generates inconsistent sideEffects metadata:

https://github.com/evanw/esbuild/blob/master/CHANGELOG.md#01435

@maoxiaoke
Copy link

maoxiaoke commented Apr 12, 2022

Lock esbuild to version 0.14.34. It's likely esbuild had a breakchange.

Looks like this one is affecting.

  • Validate that path metadata returned by plugins is consistent

The plugin API assumes that all metadata for the same path returned by a plugin's onResolve callback is consistent. Previously this assumption was just assumed without any enforcement. Starting with this release, esbuild will now enforce this by generating a build error if this assumption is violated. The lack of validation has not been an issue (I have never heard of this being a problem), but it still seems like a good idea to enforce it. Here's a simple example of a plugin that generates inconsistent sideEffects metadata:

https://github.com/evanw/esbuild/blob/master/CHANGELOG.md#01435

In that way, the author should publish a minor version instead of a patch.

@andrewcourtice
Copy link

Critical dependencies of Vite such as ESBuild and Rollup should probably be version-locked to prevent this from happening in the future.

@patak-dev
Copy link
Member

PR welcome to lock it in 2.9 (while we look at the compat issue)

@bluwy
Copy link
Member

bluwy commented Apr 12, 2022

I don't think we should version lock esbuild. They (seem to have) made a breaking change in a patch release and broke semver. It should be fine if they made a minor bump instead, otherwise projects don't get patch improvements / security fixes automatically.

bompus added a commit to bompus/vite that referenced this issue Apr 12, 2022
bompus added a commit to bompus/vite that referenced this issue Apr 12, 2022
bompus added a commit to bompus/vite that referenced this issue Apr 12, 2022
@nathanoffline
Copy link

I've temporarily fixed my issue by uninstalling vite and reinstalling v2.7.13 (latest version before vite@2.8.0, which also coincides with the upgrade of esbuild@0.13.12 to esbuild@0.14.14). Not the most ideal solution, but I was also able to get vite working properly in a test project with the overrides or resolutions trick in package.json. Hopefully this gets resolved!

@ismoiliy98
Copy link

I don't think we should version lock esbuild. They (seem to have) made a breaking change in a patch release and broke semver. It should be fine if they made a minor bump instead, otherwise projects don't get patch improvements / security fixes automatically.

esbuild is in active development and has not reached version 1.0.0 yet, so if the version will not be "locked" - there can be a lot of problems like this in the future (when esbuild releases breaking changes). Before bumping the esbuilds version it should be checked for compatibility with the vite package(s)

@bluwy
Copy link
Member

bluwy commented Apr 12, 2022

esbuild is in active development and has not reached version 1.0.0 yet, so if the version will not be "locked" - there can be a lot of problems like this in the future (when esbuild releases breaking changes). Before bumping the esbuilds version it should be checked for compatibility with the vite package(s)

The issue is that esbuild released a breaking change in a patch release, breaking semver regardless if it's in active development. We would only need to check for compatibility when esbuild bumps a minor.

@gongzemin
Copy link

Downgrade vite from 2.9.1 to 2.7.1 fix this temporary.

@bompus
Copy link
Contributor

bompus commented Apr 12, 2022

esbuild dev is aware esbuild/#2177 and reverted the change. Likely will publish 0.14.36 soon.

@ishaiavrahami
Copy link

having same issue now

@patak-dev
Copy link
Member

Closing as esbuild 0.14.36 is out reverting the change. Great work @sapphi-red 🙌

@ishaiavrahami
Copy link

ishaiavrahami commented Apr 12, 2022

Im still getting an error.

Here is my log
`
✘ [ERROR] Detected inconsistent metadata for the path "node_modules/vue/dist/vue.runtime.esm-bundler.js" when it was imported here:

dep:vue:2:14:
  2 │ export * from "./node_modules/vue/dist/vue.runtime.esm-bundler.js"
    ╵               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The original metadata for that path comes from when it was imported here:

node_modules/@headlessui/vue/dist/headlessui.esm.js:1:172:
  1 │ ...s j,onMounted as pt,onUnmounted as Co,provide as Eo,ref as H,toRaw as dt,watch as ft,watchEffect as Be}from"vue";import{h as po,cloneVNode as fo}from"vue";function T(t,n,...u){if(t in n){let o=n[t];return typeof o=="fun...
    ╵                                                                                                               ~~~~~

The difference in metadata is displayed below:

{

  • "pluginName": "vite:dep-pre-bundle",
  • "pluginName": null,
    }

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.

✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/ag-grid-community/dist/ag-grid-community.cjs.js" when it was imported here:

node_modules/ag-grid-vue3/lib/AgGridVue.js:14:36:
  14 │ import { ComponentUtil, Grid } from 'ag-grid-community';
     ╵                                     ~~~~~~~~~~~~~~~~~~~

The original metadata for that path comes from when it was imported here:

dep:ag-grid-community:1:23:
  1 │ export default require("./node_modules/ag-grid-community/dist/ag-grid-community.cjs.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.

✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/ag-grid-community/dist/ag-grid-community.cjs.js" when it was imported here:

node_modules/ag-grid-vue3/lib/VueFrameworkOverrides.js:14:42:
  14 │ import { VanillaFrameworkOverrides } from 'ag-grid-community';
     ╵                                           ~~~~~~~~~~~~~~~~~~~

The original metadata for that path comes from when it was imported here:

dep:ag-grid-community:1:23:
  1 │ export default require("./node_modules/ag-grid-community/dist/ag-grid-community.cjs.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.

✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/ag-grid-community/dist/ag-grid-community.cjs.js" when it was imported here:

node_modules/ag-grid-vue3/lib/VueFrameworkComponentWrapper.js:14:37:
  14 │ import { BaseComponentWrapper } from 'ag-grid-community';
     ╵                                      ~~~~~~~~~~~~~~~~~~~

The original metadata for that path comes from when it was imported here:

dep:ag-grid-community:1:23:
  1 │ export default require("./node_modules/ag-grid-community/dist/ag-grid-community.cjs.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.

✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/ag-grid-community/dist/ag-grid-community.cjs.js" when it was imported here:

node_modules/ag-grid-vue3/lib/AgGridColumn.js:1:27:
  1 │ import { ColDefUtil } from 'ag-grid-community';
    ╵                            ~~~~~~~~~~~~~~~~~~~

The original metadata for that path comes from when it was imported here:

dep:ag-grid-community:1:23:
  1 │ export default require("./node_modules/ag-grid-community/dist/ag-grid-community.cjs.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.

✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/ag-grid-community/dist/ag-grid-community.cjs.js" when it was imported here:

node_modules/ag-grid-vue3/lib/Utils.js:1:30:
  1 │ import { ComponentUtil } from 'ag-grid-community';
    ╵                               ~~~~~~~~~~~~~~~~~~~

The original metadata for that path comes from when it was imported here:

dep:ag-grid-community:1:23:
  1 │ export default require("./node_modules/ag-grid-community/dist/ag-grid-community.cjs.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.

✘ [ERROR] Detected inconsistent metadata for the path "node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js" when it was imported here:

node_modules/@babel/runtime/helpers/esm/superPropBase.js:1:27:
  1 │ import getPrototypeOf from "./getPrototypeOf.js";
    ╵                            ~~~~~~~~~~~~~~~~~~~~~

The original metadata for that path comes from when it was imported here:

node_modules/helper-js/dist/helper-js.esm.js:11:28:
  11 │ import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
     ╵                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The difference in metadata is displayed below:

{

  • "pluginName": "vite:dep-pre-bundle",
  • "type": null,
  • "pluginName": null,
  • "type": "module",
    }

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.

✘ [ERROR] Detected inconsistent metadata for the path "node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js" when it was imported here:

node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js:2:34:
  2 │ import assertThisInitialized from "./assertThisInitialized.js";
    ╵                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The original metadata for that path comes from when it was imported here:

node_modules/helper-js/dist/helper-js.esm.js:7:35:
  7 │ import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized';
    ╵                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The difference in metadata is displayed below:

{

  • "pluginName": "vite:dep-pre-bundle",
  • "type": null,
  • "pluginName": null,
  • "type": "module",
    }

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.
`

@aclec
Copy link

aclec commented Apr 12, 2022

Im still getting an error.

Here is my log ` ✘ [ERROR] Detected inconsistent metadata for the path "node_modules/vue/dist/vue.runtime.esm-bundler.js" when it was imported here:

If you're using yarn, think to do "yarn clean cache" to get new version.

@ishaiavrahami
Copy link

@aclec im using npm. What do i do?

@aclec
Copy link

aclec commented Apr 12, 2022

@ishaiavrahami "npm cache clean --force"

@ishaiavrahami
Copy link

@aclec i cleared the cache then deleted node_modules and then ran npm install and still getting the same error log

@aladdin-add
Copy link

you'll need to update/regenerate your lock file. e.g package-lock.json/yarn.lock/pnpm.lock

@ishaiavrahami
Copy link

@aclec @aladdin-add thanks i got it to work by removing package-lock.json and removing node_modules then ran npm install

@1291927234
Copy link

I have the same problem

@ishaiavrahami
Copy link

@aclec @aladdin-add thanks i got it to work by removing package-lock.json and removing node_modules then ran npm install

@1291927234 follow this

@1291927234
Copy link

I will have a try,thanks @ishaiavrahami

@github-actions github-actions bot locked and limited conversation to collaborators Apr 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.