You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ vite
vite v2.9.1 dev server running at:
> Local: http://localhost:3000/
> Network: use `--host` to expose
ready in 271ms.
✘ [ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/react/index.js" when it was imported here:
node_modules/react/cjs/react-jsx-dev-runtime.development.js:16:20:
16 │ var React = require('react');
╵ ~~~~~~~
The original metadata for that path comes from when it was imported here:
dep:react:1:23:
1 │ export default require("./node_modules/react/index.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 fora given pathin 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/react/index.js" when it was imported here:
node_modules/react-dom/cjs/react-dom.development.js:16:20:
16 │ var React = require('react');
╵ ~~~~~~~
The original metadata for that path comes from when it was imported here:
dep:react:1:23:
1 │ export default require("./node_modules/react/index.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 fora given pathin 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.
10:49:37 PM [vite] error while updating dependencies:
Error: Build failed with 2 errors:
node_modules/react-dom/cjs/react-dom.development.js:16:20: ERROR: [plugin: vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/react/index.js" when it was imported here:
node_modules/react/cjs/react-jsx-dev-runtime.development.js:16:20: ERROR: [plugin: vite:dep-pre-bundle] Detected inconsi at failureErrorWithLog (D:\projects\web-projects\test\node_modules\esbuild\lib\main.js:1603:15)
at D:\projects\web-projects\test\node_modules\esbuild\lib\main.js:1249:28
at runOnEndCallbacks (D:\projects\web-projects\test\node_modules\esbuild\lib\main.js:1034:63)
at buildResponseToResult (D:\projects\web-projects\test\node_modules\esbuild\lib\main.js:1247:7)
at D:\projects\web-projects\test\node_modules\esbuild\lib\main.js:666:9
at Socket.readFromStdout (D:\projects\web-projects\test\node_modules\esbuild\lib\main.js:632:7)
at Socket.emit (events.js:321:20)
at addChunk (_stream_readable.js:294:12)
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.
Describe the bug
Ran
Picked React and typescript, also happens with react js
Throws errors
Doesn't happen with vanilla js nor typescript, only react
Reproduction
yarn create vite & cd test & yarn & yarn dev
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: