-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Inconsistent Metadata errors #7685
Comments
Happens with React JS and React TS as well
|
was just going to file an issue
|
Happens with VUE JS as well The original metadata for that path comes from when it was imported here:
The difference in metadata is displayed below: {
This is a bug in the "vite:dep-pre-bundle" plugin. Plugins provide metadata for a given path in an 下午12:21:14 [vite] error while updating dependencies:
The original metadata for that path comes from when it was imported here:
The difference in metadata is displayed below: {
This is a bug in the "vite:dep-pre-bundle" plugin. Plugins provide metadata for a given path in an 下午12:21:19 [vite] error while updating dependencies: |
Happens with Logs❯ yarn dev
yarn run v1.22.17
$ vite
vite v2.9.1 dev server running at:
> Local: http://localhost:3000/
> Network: use `--host` to expose
ready in 389ms.
✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/preact/dist/preact.module.js" when it was imported here:
node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js:1:38:
1 │ import{options as r,Fragment as _}from"preact";export{Fragment}from"preact";var o=0;function e(_,e,n,t,f){var l,s,u={};for(s in e)"ref"==s?l=e[s]:u...
╵ ~~~~~~~~
The original metadata for that path comes from when it was imported here:
dep:preact:2:14:
2 │ export * from "./node_modules/preact/dist/preact.module.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/preact/dist/preact.module.js" when it was imported here:
node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js:1:67:
1 │ import{options as r,Fragment as _}from"preact";export{Fragment}from"preact";var o=0;function e(_,e,n,t,f){var l,s,u={};for(s in e)"ref"==s?l=e[s]:u...
╵ ~~~~~~~~
The original metadata for that path comes from when it was imported here:
dep:preact:2:14:
2 │ export * from "./node_modules/preact/dist/preact.module.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.
9:23:20 AM [vite] error while updating dependencies:
Error: Build failed with 2 errors:
node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js:1:38: ERROR: [plugin: vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/preact/dist/preact.module.js" when it was imported here:
node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js:1:67: ERROR: [plugin: vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/preact/dist/preact.module.js" when it was imported here:
at failureErrorWithLog (/preact-project/node_modules/esbuild/lib/main.js:1603:15)
at /preact-project/node_modules/esbuild/lib/main.js:1249:28
at runOnEndCallbacks (/preact-project/node_modules/esbuild/lib/main.js:1034:63)
at buildResponseToResult (/preact-project/node_modules/esbuild/lib/main.js:1247:7)
at /preact-project/node_modules/esbuild/lib/main.js:1356:14
at /preact-project/node_modules/esbuild/lib/main.js:666:9
at handleIncomingPacket (/preact-project/node_modules/esbuild/lib/main.js:763:9)
at Socket.readFromStdout (/preact-project/node_modules/esbuild/lib/main.js:632:7)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12) |
Same error here Using vue3-latest I literally just now uninstalled vue-router and downgraded to v3 of router and works. This is a fresh install btw so i can't tell yet how this will behave
|
The issue seems related to A temporary workaround is to add "resolutions": {
"esbuild": "0.14.34"
} |
Same to me on react vite v2.9.1 dev server running at:
ready in 414ms. ✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/react/index.js" when it was imported here:
The original metadata for that path comes from when it was imported here:
The difference in metadata is displayed below: {
This is a bug in the "vite:dep-pre-bundle" plugin. Plugins provide metadata for a given path in an ✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/react/index.js" when it was imported here:
The original metadata for that path comes from when it was imported here:
The difference in metadata is displayed below: {
This is a bug in the "vite:dep-pre-bundle" plugin. Plugins provide metadata for a given path in an 10:57:04 AM [vite] error while updating dependencies: |
|
Same issue here. @Geebrox's temporary workaround works well.
|
I hava the same error, when the version is
things are ok,no error.
the version of vite is 2.8.6 or 2.9.1 , same error |
Unfortunately, I'm unable to replicate @Geebrox's solution... are resolutions PNPM specific? |
Working on Reactjs too, Thanks man! |
maybe is yarn |
This looks like a duplicate of #7683 as noted in the issue description. Closing to keep discussion in one place. |
Thank you, works. Also, i'm using "overrides": {
"esbuild": "0.14.34"
},
|
Thank man 👍! |
请问解决这个问题了吗,我也是这个问题 vue项目 |
解决了,删除 node_modules 重新install一下就行了 |
谢谢呢 |
Please remove the custom resolutions, esbuild 0.14.36 has been released reverting the problematic change |
原因是vite的依赖包esbuild今天上午发布了一个新版本0.14.35,有问题。0.14.34是没问题的。简单来说,resolutions是yarn的固定版本的一个方法。刚刚,esbuild又发布了一个新版本0.14.36,解决了这个问题 |
that's useful for me. |
Describe the bug
I get this when starting my dev server
Possible duplicate of #7683
Reproduction
https://stackblitz.com/edit/vitejs-vite-f48pac?file=package.json
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: