esbuild0.14.35 is not compate with vite
See original GitHub issueDescribe 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
- 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:10
- Comments:28 (8 by maintainers)
Top Results From Across the Web
Why Vite
Vite pre-bundles dependencies using esbuild. esbuild is written in Go and pre-bundles dependencies 10-100x faster than JavaScript-based bundlers.
Read more >esbuild - npm
An extremely fast JavaScript and CSS bundler and minifier.. Latest version: 0.16.10, last published: 3 days ago. Start using esbuild in your ...
Read more >esbuild-linux-ppc64le - NPM Package Versions - Socket.dev
0.15.15 · Remove duplicate CSS rules across files (#2688). When two or more CSS rules are exactly the same (even if they are...
Read more >Getting Started - ESBuild
#Install esbuild. First, download and install the esbuild command locally. A prebuilt native executable can be installed using npm (which is automatically ...
Read more >Esbuild-wasm NPM
This is the cross-platform WebAssembly binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the JavaScript API ...
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
same problem
Lock esbuild to version 0.14.34. It’s likely esbuild had a breakchange.