nuxt / vite

⚡ Vite Experience with Nuxt 2

Home Page:https://vite.nuxtjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ERROR] [plugin vite:dep-pre-bundle] Detected inconsistent metadata for the path "node_modules/react/index.js" when it was imported here:

VictorValdespino opened this issue · comments

X [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 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.

X [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 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.

21:48:38 [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 inconsistent metadata for the path "node_modules/react/index.js" when it was imported here:
at failureErrorWithLog (C:\Users\vmvj1\Documents\ProyectosReact\control-gastos\node_modules\esbuild\lib\main.js:1603:15)
at C:\Users\vmvj1\Documents\ProyectosReact\control-gastos\node_modules\esbuild\lib\main.js:1249:28
at runOnEndCallbacks (C:\Users\vmvj1\Documents\ProyectosReact\control-gastos\node_modules\esbuild\lib\main.js:1034:63)
at buildResponseToResult (C:\Users\vmvj1\Documents\ProyectosReact\control-gastos\node_modules\esbuild\lib\main.js:1247:7)
at C:\Users\vmvj1\Documents\ProyectosReact\control-gastos\node_modules\esbuild\lib\main.js:1356:14
at C:\Users\vmvj1\Documents\ProyectosReact\control-gastos\node_modules\esbuild\lib\main.js:666:9
at handleIncomingPacket (C:\Users\vmvj1\Documents\ProyectosReact\control-gastos\node_modules\esbuild\lib\main.js:763:9)
at Socket.readFromStdout (C:\Users\vmvj1\Documents\ProyectosReact\control-gastos\node_modules\esbuild\lib\main.js:632:7)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)

Same here.

Me too.

Me too,how can i do

I delete the node_modules folder, install dependencies again and it's working.