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

Duplicate module bundles when optimized dependencies are reloaded during build #9171

Closed
7 tasks done
mochiya98 opened this issue Jul 17, 2022 · 12 comments · Fixed by #15184
Closed
7 tasks done

Duplicate module bundles when optimized dependencies are reloaded during build #9171

mochiya98 opened this issue Jul 17, 2022 · 12 comments · Fixed by #15184
Labels
feat: deps optimizer Esbuild Dependencies Optimization p4-important Violate documented behavior or significantly improves performance (priority)

Comments

@mochiya98
Copy link

mochiya98 commented Jul 17, 2022

Describe the bug

Duplicate module bundles when optimized dependencies are reloaded during build.

It was very hard to reproduce this bug...it took a long time.
It depends on a very sensitive behavior and may not always be reproduced.
If you can't reproduce it, try increasing the file or increasing the delay.
Dependencies are not as important as huge dependencies just needed to be.
Please look at vite.config.ts.

// only the important parts
import { defineConfig, UserConfig } from 'vite';

export default defineConfig(({ command, mode }) => {
  const config: UserConfig = {
    build: {
      commonjsOptions: { include: [] },
    },
    optimizeDeps: {
      disabled: false,
    },
    plugins: [
      {
        name: 'Test',
        apply: 'build',
        enforce: 'pre',
        renderChunk(code, chunk) {
          const modulesMap = new Map<string, string[]>();
          for (const id of Object.keys(chunk.modules)) {
            const idWithoutQuery = id.replace(/\?.+$/, '');
            let c = modulesMap.get(idWithoutQuery);
            if (!c) modulesMap.set(idWithoutQuery, (c = []));
            c.push(id);
          }
          for (const c of modulesMap.values()) {
            if (c.length === 1) continue;
            console.log('Duplicated module found:');
            for (const id of c) {
              console.log(` ${id}`);
            }
          }
          return null;
        },
      },
    ],
  };
  return config;
});

npm run build output:

Duplicated module found:
 /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-5CYG367S.js?v=d28617ec
 /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-5CYG367S.js?v=717aaaee

For example, when this bug occurs for react.development.js , it causes an error because the context of the hooks is duplicated and cannot be referenced correctly:

Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

Reproduction

https://stackblitz.com/edit/vitejs-vite-8vghhj?file=vite.config.ts

System Info

❯ npx envinfo --system --npmPackages '{vite,@vitejs/*}' --binaries --browsers
success Install finished in 1.004s


  System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.10 - /bin/yarn
    npm: 7.17.0 - /bin/npm
  npmPackages:
    @vitejs/plugin-react: ^2.0.0 => 2.0.0 
    vite: ^3.0.0 => 3.0.0 


~/projects/vitejs-vite-8vghhj 6s
❯

Used Package Manager

npm

Logs

verbose log in terminal
❯ npm run build
$ rm -rf node_modules/.vite && DEBUG=vite:* vite build
  vite:config TS + native esm config loaded in 2688.70ms URL {
  href: 'file:///home/projects/vitejs-vite-8vghhj/vite.config.ts',
  origin: 'null',
  protocol: 'file:',
  username: '',
  password: '',
  host: '',
  hostname: '',
  port: '',
  pathname: '/home/projects/vitejs-vite-8vghhj/vite.config.ts',
  search: '',
  searchParams: URLSearchParams {},
  hash: ''
} +0ms
  vite:config using resolved config: {
  vite:config   esbuild: { supported: { 'dynamic-import': true, 'import-meta': true } },
  vite:config   build: {
  vite:config     target: 'es6',
  vite:config     polyfillModulePreload: true,
  vite:config     outDir: 'dist',
  vite:config     assetsDir: 'assets',
  vite:config     assetsInlineLimit: 4096,
  vite:config     cssCodeSplit: true,
  vite:config     cssTarget: 'es6',
  vite:config     sourcemap: true,
  vite:config     rollupOptions: { plugins: [Array] },
  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: [], extensions: [Array] },
  vite:config     dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] }
  vite:config   },
  vite:config   optimizeDeps: {
  vite:config     disabled: false,
  vite:config     include: [ 'react/jsx-runtime', 'react/jsx-dev-runtime' ],
  vite:config     esbuildOptions: { preserveSymlinks: undefined }
  vite:config   },
  vite:config   clearScreen: false,
  vite:config   plugins: [
  vite:config     'vite:build-metadata',
  vite:config     'vite:pre-alias',
  vite:config     'alias',
  vite:config     'vite:react-babel',
  vite:config     'vite:react-refresh',
  vite:config     'vite:react-jsx',
  vite:config     'Test',
  vite:config     'vite:modulepreload-polyfill',
  vite:config     'vite:optimized-deps-build',
  vite:config     'vite:resolve',
  vite:config     'vite:html-inline-proxy',
  vite:config     'vite:css',
  vite:config     'vite:esbuild',
  vite:config     'vite:json',
  vite:config     'vite:wasm-helper',
  vite:config     'vite:worker',
  vite:config     'vite:asset',
  vite:config     'vite:wasm-fallback',
  vite:config     'vite:define',
  vite:config     'vite:css-post',
  vite:config     'vite:build-html',
  vite:config     'vite:worker-import-meta-url',
  vite:config     'vite:watch-package-data',
  vite:config     'vite:data-uri',
  vite:config     'vite:asset-import-meta-url',
  vite:config     'babel',
  vite:config     'vite:dynamic-import-vars',
  vite:config     'vite:import-glob',
  vite:config     'vite:build-import-analysis',
  vite:config     'vite:esbuild-transpile',
  vite:config     'vite:terser',
  vite:config     'vite:reporter',
  vite:config     'vite:load-fallback'
  vite:config   ],
  vite:config   resolve: { dedupe: [ 'react', 'react-dom' ], alias: [ [Object], [Object] ] },
  vite:config   configFile: '/home/projects/vitejs-vite-8vghhj/vite.config.ts',
  vite:config   configFileDependencies: [ '/home/projects/vitejs-vite-8vghhj/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     optimizeDeps: { force: undefined },
  vite:config     build: {}
  vite:config   },
  vite:config   root: '/home/projects/vitejs-vite-8vghhj',
  vite:config   base: '/',
  vite:config   publicDir: '/home/projects/vitejs-vite-8vghhj/public',
  vite:config   cacheDir: '/home/projects/vitejs-vite-8vghhj/node_modules/.vite',
  vite:config   command: 'build',
  vite:config   mode: 'production',
  vite:config   ssr: {
  vite:config     format: 'esm',
  vite:config     target: 'node',
  vite:config     optimizeDeps: { disabled: true, esbuildOptions: [Object] }
  vite:config   },
  vite:config   isWorker: false,
  vite:config   mainConfig: null,
  vite:config   isProduction: true,
  vite:config   server: {
  vite:config     preTransformRequests: true,
  vite:config     middlewareMode: false,
  vite:config     fs: { strict: true, allow: [Array], deny: [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: 'production', DEV: false, PROD: true },
  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) { set: [Function (anonymous)] },
  vite:config   createResolver: [Function: createResolver],
  vite:config   worker: {
  vite:config     format: 'iife',
  vite:config     plugins: [
  vite:config       [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object],
  vite:config       [Object], [Object]
  vite:config     ],
  vite:config     rollupOptions: {}
  vite:config   },
  vite:config   appType: 'spa',
  vite:config   experimental: { importGlobRestoreExtension: false, hmrPartialAccept: false }
  vite:config } +23ms
vite v3.0.0 building for production...
  vite:resolve 12.00ms react/jsx-runtime -> /home/projects/vitejs-vite-8vghhj/node_modules/react/jsx-runtime.js +0ms
  vite:resolve 3.90ms react/jsx-dev-runtime -> /home/projects/vitejs-vite-8vghhj/node_modules/react/jsx-dev-runtime.js +4ms
transforming (1) index.html  vite:deps ✨ static imports crawl ended +0ms
  vite:deps new dependencies found: react/jsx-runtime, react/jsx-dev-runtime +5ms
  vite:resolve 1.90ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:deps deps bundled in 795.20ms +815ms
  vite:deps ✨ dependencies optimized +2ms
transforming (2) vite/modulepreload-polyfill  vite:deps ✨ static imports crawl ended +10s
  vite:deps new dependencies found: core-js/modules/es.object.to-string.js +939ms
  vite:resolve 1.60ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:deps deps bundled in 646.60ms +663ms
  vite:deps ✨ delaying reload as new dependencies have been found... +3ms
  vite:deps new dependencies found: core-js/modules/es.object.to-string.js, core-js/modules/es.promise.js +0ms
  vite:resolve 1.40ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:deps deps bundled in 939.20ms +956ms
  vite:deps ✨ delaying reload as new dependencies have been found... +2ms
  vite:deps new dependencies found: core-js/modules/es.object.to-string.js, core-js/modules/es.promise.js, core-js/modules/es.string.repeat.js, core-js/modules/es.array.iterator.js, core-js/modules/es.set.js +0ms
  vite:resolve 1.50ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:resolve 1.60ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:deps deps bundled in 765.60ms +780ms
  vite:deps ✨ delaying reload as new dependencies have been found... +3ms
  vite:deps new dependencies found: core-js/modules/es.object.to-string.js, core-js/modules/es.promise.js, core-js/modules/es.string.repeat.js, core-js/modules/es.array.iterator.js, core-js/modules/es.set.js, core-js/modules/es.string.iterator.js, core-js/modules/web.dom-collections.iterator.js +18ms
  vite:resolve 1.50ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:resolve 1.50ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:deps deps bundled in 813.40ms +828ms
  vite:deps ✨ delaying reload as new dependencies have been found... +3ms
  vite:deps new dependencies found: core-js/modules/es.object.to-string.js, core-js/modules/es.promise.js, core-js/modules/es.string.repeat.js, core-js/modules/es.array.iterator.js, core-js/modules/es.set.js, core-js/modules/es.string.iterator.js, core-js/modules/web.dom-collections.iterator.js, react-dom/client, @loadable/component +0ms
  vite:resolve 0.70ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:resolve 2.10ms @babel/runtime/helpers/esm/objectWithoutPropertiesLoose -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +11ms
  vite:resolve 1.30ms @babel/runtime/helpers/esm/extends -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/extends.js +8ms
  vite:resolve 1.40ms @babel/runtime/helpers/esm/assertThisInitialized -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +12ms
  vite:resolve 1.80ms @babel/runtime/helpers/esm/inheritsLoose -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +31ms
  vite:resolve 0.80ms react-dom -> /home/projects/vitejs-vite-8vghhj/node_modules/react-dom/index.js +0ms
  vite:resolve 1.20ms react-is -> /home/projects/vitejs-vite-8vghhj/node_modules/react-is/index.js +47ms
  vite:resolve 1.10ms hoist-non-react-statics -> /home/projects/vitejs-vite-8vghhj/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +20ms
  vite:resolve 1.00ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +70ms
transforming (3) main.jsx  vite:resolve 0.90ms react-is -> /home/projects/vitejs-vite-8vghhj/node_modules/react-is/index.js +29ms
  vite:deps ✨ static imports crawl ended +384ms
  vite:resolve 1.30ms scheduler -> /home/projects/vitejs-vite-8vghhj/node_modules/scheduler/index.js +540ms
  vite:deps deps bundled in 1645.90ms +1s
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/core-js_modules_es__object__to-string__js.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/core-js_modules_es__promise__js.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/core-js_modules_es__string__repeat__js.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/core-js_modules_es__array__iterator__js.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/core-js_modules_es__set__js.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/core-js_modules_es__string__iterator__js.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/core-js_modules_web__dom-collections__iterator__js.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/@loadable_component.js +1ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/react-dom_client.js +0ms
1:22:32 [vite] ✨ optimized dependencies changed. reloading
transforming (4) node_modules/.vite/deps_build-dist/core-js_modules_es__object__to-string__js.js  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-XGET4L4W.js +2s
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-T2UMFS4B.js +1ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-5CYG367S.js +1ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-TKXGSSSJ.js +1ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-42TFBLJJ.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-5Q6A2WTY.js +1ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-AFZACNZ3.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-JMR3THOB.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-CMC5XOS3.js +1ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-GP4AGIPG.js +0ms
transforming (23) react/jsx-runtime  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/react_jsx-runtime.js +7s
transforming (26) sub.jsx  vite:deps ✨ static imports crawl ended +10s
  vite:deps new dependencies found: core-js/modules/es.array.some.js +11s
  vite:resolve 0.80ms react-dom -> /home/projects/vitejs-vite-8vghhj/node_modules/react-dom/index.js +0ms
  vite:resolve 0.60ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:resolve 1.10ms @babel/runtime/helpers/esm/objectWithoutPropertiesLoose -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +9ms
  vite:resolve 8.90ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +38ms
  vite:resolve 8.60ms @babel/runtime/helpers/esm/extends -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/extends.js +19ms
  vite:resolve 2.60ms @babel/runtime/helpers/esm/assertThisInitialized -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +43ms
  vite:resolve 3.10ms @babel/runtime/helpers/esm/inheritsLoose -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +11ms
  vite:resolve 1.40ms react-is -> /home/projects/vitejs-vite-8vghhj/node_modules/react-is/index.js +14ms
  vite:resolve 1.50ms hoist-non-react-statics -> /home/projects/vitejs-vite-8vghhj/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +443ms
  vite:resolve 1.60ms scheduler -> /home/projects/vitejs-vite-8vghhj/node_modules/scheduler/index.js +561ms
  vite:resolve 0.80ms react-is -> /home/projects/vitejs-vite-8vghhj/node_modules/react-is/index.js +40ms
  vite:deps deps bundled in 1933.40ms +2s
1:22:55 [vite] ✨ optimized dependencies changed. reloading
  vite:deps new dependencies found: core-js/modules/es.array.flat.js +864ms
  vite:resolve 1.00ms react-dom -> /home/projects/vitejs-vite-8vghhj/node_modules/react-dom/index.js +0ms
  vite:resolve 0.80ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:resolve 2.20ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +40ms
  vite:resolve 2.30ms @babel/runtime/helpers/esm/objectWithoutPropertiesLoose -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +27ms
  vite:resolve 1.10ms @babel/runtime/helpers/esm/extends -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/extends.js +20ms
  vite:resolve 1.50ms @babel/runtime/helpers/esm/assertThisInitialized -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +19ms
  vite:resolve 1.10ms @babel/runtime/helpers/esm/inheritsLoose -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +10ms
  vite:resolve 1.90ms react-is -> /home/projects/vitejs-vite-8vghhj/node_modules/react-is/index.js +511ms
  vite:resolve 1.90ms scheduler -> /home/projects/vitejs-vite-8vghhj/node_modules/scheduler/index.js +560ms
  vite:resolve 0.90ms hoist-non-react-statics -> /home/projects/vitejs-vite-8vghhj/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +49ms
  vite:resolve 0.80ms react-is -> /home/projects/vitejs-vite-8vghhj/node_modules/react-is/index.js +129ms
transforming (27) sub2.jsx  vite:deps ✨ static imports crawl ended +1s
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/core-js_modules_es__array__some__js.js +16s
  vite:deps deps bundled in 1750.50ms +550ms
  vite:deps ✨ delaying reload as new dependencies have been found... +3ms
  vite:deps new dependencies found: core-js/modules/es.array.flat.js, core-js/modules/es.array.unscopables.flat.js, @fluentui/react, @fluentui/react-hooks +1ms
  vite:resolve 0.60ms react-dom -> /home/projects/vitejs-vite-8vghhj/node_modules/react-dom/index.js +0ms
  vite:resolve 0.90ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +0ms
  vite:resolve 1.40ms @babel/runtime/helpers/esm/objectWithoutPropertiesLoose -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +9ms
  vite:resolve 1.20ms @babel/runtime/helpers/esm/extends -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/extends.js +11ms
transforming (28) node_modules/.vite/deps_build-dist/core-js_modules_es__array__some__js.js  vite:resolve 1.60ms @babel/runtime/helpers/esm/assertThisInitialized -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +30ms
  vite:resolve 12.80ms @babel/runtime/helpers/esm/inheritsLoose -> /home/projects/vitejs-vite-8vghhj/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +21ms
  vite:resolve 0.70ms react-is -> /home/projects/vitejs-vite-8vghhj/node_modules/react-is/index.js +19ms
  vite:resolve 1.20ms react -> /home/projects/vitejs-vite-8vghhj/node_modules/react/index.js +129ms
  vite:resolve 0.90ms hoist-non-react-statics -> /home/projects/vitejs-vite-8vghhj/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +39ms
  vite:resolve 1.20ms react-is -> /home/projects/vitejs-vite-8vghhj/node_modules/react-is/index.js +40ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-DPQ2IYGY.js +809ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-ZHZD247S.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-XGET4L4W.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-GGAXKSYV.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-T2UMFS4B.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-5CYG367S.js +0ms
  vite:resolve 1.40ms scheduler -> /home/projects/vitejs-vite-8vghhj/node_modules/scheduler/index.js +340ms
  vite:resolve 1.30ms @fluentui/utilities -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/utilities/lib/index.js +736ms
  vite:resolve 0.90ms @fluentui/set-version -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/set-version/lib/index.js +65ms
  vite:resolve 14.20ms tslib -> /home/projects/vitejs-vite-8vghhj/node_modules/tslib/tslib.es6.js +23ms
  vite:resolve 1.60ms @fluentui/react-window-provider -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react-window-provider/lib/index.js +36ms
  vite:resolve 2.50ms @fluentui/date-time-utilities -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/date-time-utilities/lib/index.js +232ms
  vite:resolve 2.40ms @fluentui/react-focus -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react-focus/lib/index.js +0ms
  vite:resolve 1.10ms @fluentui/font-icons-mdl2 -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/font-icons-mdl2/lib/index.js +29ms
  vite:resolve 1.30ms @fluentui/theme -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/theme/lib/index.js +29ms
  vite:resolve 8.20ms @fluentui/merge-styles -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/merge-styles/lib/index.js +77ms
  vite:resolve 1.20ms @fluentui/style-utilities -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/style-utilities/lib/index.js +444ms
  vite:resolve 1.20ms @fluentui/react-hooks -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react-hooks/lib/index.js +149ms
  vite:resolve 1.10ms ./ExtendedPeoplePicker.scss -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react/lib/components/ExtendedPicker/PeoplePicker/ExtendedPeoplePicker.scss.js +534ms
  vite:resolve 4.20ms @fluentui/foundation-legacy -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/foundation-legacy/lib/index.js +569ms
  vite:resolve 1.00ms @fluentui/dom-utilities -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/dom-utilities/lib/index.js +99ms
  vite:resolve 5.80ms ./BaseExtendedPicker.scss -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react/lib/components/ExtendedPicker/BaseExtendedPicker.scss.js +84ms
  vite:resolve 2.10ms ./BaseFloatingPicker.scss -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react/lib/components/FloatingPicker/BaseFloatingPicker.scss.js +796ms
  vite:resolve 0.80ms @fluentui/react-portal-compat-context -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react-portal-compat-context/lib/index.js +8ms
  vite:resolve 1.80ms react-dom -> /home/projects/vitejs-vite-8vghhj/node_modules/react-dom/index.js +81ms
  vite:resolve 1.40ms @microsoft/load-themed-styles -> /home/projects/vitejs-vite-8vghhj/node_modules/@microsoft/load-themed-styles/lib-es6/index.js +30ms
  vite:resolve 0.60ms ./ExtendedSelectedItem.scss -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react/lib/components/SelectedItemsList/SelectedPeopleList/Items/ExtendedSelectedItem.scss.js +229ms
  vite:resolve 0.40ms ./SuggestionsControl.scss -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react/lib/components/FloatingPicker/Suggestions/SuggestionsControl.scss.js +111ms
  vite:resolve 2.00ms ./SuggestionsCore.scss -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react/lib/components/FloatingPicker/Suggestions/SuggestionsCore.scss.js +60ms
  vite:resolve 0.40ms ./PeoplePicker.scss -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react/lib/components/FloatingPicker/PeoplePicker/PeoplePicker.scss.js +119ms
  vite:resolve 1.40ms ../PeoplePicker.scss -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react/lib/components/FloatingPicker/PeoplePicker/PeoplePicker.scss.js +441ms
  vite:resolve 0.90ms ./Suggestions.scss -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react/lib/components/pickers/Suggestions/Suggestions.scss.js +829ms
  vite:resolve 2.60ms ./BasePicker.scss -> /home/projects/vitejs-vite-8vghhj/node_modules/@fluentui/react/lib/components/pickers/BasePicker.scss.js +383ms
  vite:deps deps bundled in 8534.90ms +9s
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/core-js_modules_es__array__flat__js.js +8s
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/@fluentui_react.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/@fluentui_react-hooks.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/core-js_modules_es__array__unscopables__flat__js.js +0ms
1:23:06 [vite] ✨ optimized dependencies changed. reloading
transforming (35) node_modules/.vite/deps_build-dist/core-js_modules_es__array__flat__js.js  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-C5QD2WFK.js +2s
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-LVMNCTQZ.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-VD2EOGLI.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-KXYACYUO.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-IMNCDGEH.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-NMXPYQ4U.js +1ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-TQYI3PCM.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-3PBPFZZH.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-5CYG367S.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-UWOGETGX.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-GP4AGIPG.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-QL4X5VY4.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-ERGCFOQT.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-C7Z77LGA.js +0ms
  vite:optimize-deps load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-CIQ63ILW.js +398ms
transforming (52) node_modules/@fluentui/react/lib/components/ExtendedPicker/BaseExtendedPicker.scss.js  vite:deps ✨ static imports crawl ended +4s
✓ 63 modules transformed.
Duplicated module found:
 /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-5CYG367S.js?v=d28617ec
 /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-5CYG367S.js?v=717aaaee
  vite:deps ✨ static imports crawl ended +3s
dist/index.html                 0.38 KiB
dist/assets/sub.c7b9b02f.js     0.17 KiB / gzip: 0.14 KiB
dist/assets/sub.c7b9b02f.js.map 0.25 KiB
dist/assets/index.1787fbe6.js   193.80 KiB / gzip: 63.21 KiB
dist/assets/index.1787fbe6.js.map 1683.01 KiB
dist/assets/sub2.03024a46.js    1040.68 KiB / gzip: 294.72 KiB
dist/assets/sub2.03024a46.js.map 4507.82 KiB

(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

~/projects/vitejs-vite-8vghhj 1m 18s
❯ 

Validations

@sapphi-red sapphi-red added p4-important Violate documented behavior or significantly improves performance (priority) feat: deps optimizer Esbuild Dependencies Optimization labels Jul 17, 2022
@bluwy
Copy link
Member

bluwy commented Jul 21, 2022

When I ran npm run build in stackblitz, I got:

[vite:load-fallback] Could not load /home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-45EOH5KS.js (imported by node_modules/.vite/deps_build-dist/core-js_modules_es__object__to-string__js.js): ENOENT: no such file or directory, open '/home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-45EOH5KS.js'
error during build:
ENOENT: no such file or directory, open '/home/projects/vitejs-vite-8vghhj/node_modules/.vite/deps_build-dist/chunk-45EOH5KS.js'

instead. Prebundling also seem to happen many times, as I'm assuming the timeout is shorter than each newly discovered dependency 🤔 Seems like there may be a race condition somewhere.

@zengguirong

This comment was marked as duplicate.

@mochiya98
Copy link
Author

mochiya98 commented Sep 17, 2022

memo: Reproduction project updated. This issue still seems to be unresolved in v.3.1.1

@tjk
Copy link
Contributor

tjk commented Oct 18, 2022

Any known workaround for this? I consistently get this for lodash/* deps while building a large project.

[vite:load-fallback] Could not load /frontend/node_modules/.vite/deps_build-69a4c753/chunk-5HBYXVBG.js?v=a8a7c897 (imported by node_modules/.vite/deps_build-69a4c753/lodash_defaultsDeep.js): ENOENT: no such file or directory, open '/frontend/node_modules/.vite/deps_build-69a4c753/chunk-5HBYXVBG.js?v=a8a7c897'

The specific lodash import it is changes from build to build... but it's always some lodash import. The imports are of the form: import _sortBy from "lodash/sortBy" and similar vite config to initial post.

Edit: using vite 3.1.8, here is some more output --

#18 166.7 vite v3.1.8 building for production...
#18 166.9 transforming...
#18 181.7 
#18 181.7 A PostCSS plugin did not pass the `from` option to `postcss.parse`. This may cause imported assets to be incorrectly transformed. If you've recently added a PostCSS plugin that raised this warning, please contact the package author to fix the issue.
#18 185.3 6:00:43 AM [vite] ✨ new dependencies optimized: vue-router, vuex, lodash/clone, lodash/filter, lodash/findIndex, ...and 36 more
#18 185.3 6:00:43 AM [vite] ✨ optimized dependencies changed. reloading
#18 201.4 6:00:59 AM [vite] ✨ new dependencies optimized: safe-identifier
#18 204.5 6:01:03 AM [vite] ✨ new dependencies optimized: lodash/set, lodash/groupBy, luxon, vue-scrollto, lodash/findLastIndex, ...and 2 more
#18 204.5 6:01:03 AM [vite] ✨ optimized dependencies changed. reloading
#18 219.8 ✓ 579 modules transformed.
#18 219.8 [vite:load-fallback] Could not load /frontend/node_modules/.vite/deps_build-69a4c753/chunk-5HBYXVBG.js?v=a8a7c897 (imported by node_modules/.vite/deps_build-69a4c753/lodash_defaultsDeep.js): ENOENT: no such file or directory, open '/frontend/node_modules/.vite/deps_build-69a4c753/chunk-5HBYXVBG.js?v=a8a7c897'

@liect
Copy link

liect commented Nov 28, 2022

me too

@kgtkr
Copy link

kgtkr commented Dec 26, 2022

The same problem occurred to me, but I gave up reporting the bug because I didn't know how to reproduce(minimal-reproducible-example) it. Thank you
I currently work around this by running vite build twice

@freshBirdA
Copy link

Hello, I also met this problem, may I ask if there is a solution now

@electrovir
Copy link

My workaround is to run vite build and then vite preview. When using just the dev server, I get duplicate node_module imports but the built output does not have this problem.

@electrovir
Copy link

Another workaround: I added the specific duplicated node_module to the optimizeDeps.exclude option: https://vitejs.dev/config/dep-optimization-options.html#optimizedeps-exclude

@dardino
Copy link

dardino commented Aug 21, 2023

I have the same problem in my very large project, this results in a very large bundle, this is the output of my compilation with the "duplicate check code" described in the post:

Duplicated module found:
 /app/node_modules/react/cjs/react-jsx-runtime.production.min.js?commonjs-exports
 /app/node_modules/react/cjs/react-jsx-runtime.production.min.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/react/index.js?commonjs-module
 /app/node_modules/react/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/react/cjs/react.production.min.js?commonjs-exports
 /app/node_modules/react/cjs/react.production.min.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/axios/lib/axios.js?commonjs-module
 /app/node_modules/axios/lib/axios.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/createActions.js?commonjs-exports
 /app/node_modules/redux-arc/lib/createActions.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/utils.js?commonjs-exports
 /app/node_modules/redux-arc/lib/utils.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/createTypes.js?commonjs-exports
 /app/node_modules/redux-arc/lib/createTypes.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/createCreators.js?commonjs-exports
 /app/node_modules/redux-arc/lib/createCreators.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/fsaActionCreatorFactory.js?commonjs-exports
 /app/node_modules/redux-arc/lib/fsaActionCreatorFactory.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/apiActionCreatorFactory.js?commonjs-exports
 /app/node_modules/redux-arc/lib/apiActionCreatorFactory.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/parseUrl.js?commonjs-exports
 /app/node_modules/redux-arc/lib/parseUrl.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/validateConfig.js?commonjs-exports
 /app/node_modules/redux-arc/lib/validateConfig.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/toExternalTypes.js?commonjs-exports
 /app/node_modules/redux-arc/lib/toExternalTypes.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/toApiExternalType.js?commonjs-exports
 /app/node_modules/redux-arc/lib/toApiExternalType.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/createAsyncMiddleware.js?commonjs-exports
 /app/node_modules/redux-arc/lib/createAsyncMiddleware.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/requestMiddlewares.js?commonjs-exports
 /app/node_modules/redux-arc/lib/requestMiddlewares.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/redux-arc/lib/createReducers.js?commonjs-exports
 /app/node_modules/redux-arc/lib/createReducers.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/history/umd/history.production.min.js?commonjs-module
 /app/node_modules/history/umd/history.production.min.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/react-dom/index.js?commonjs-module
 /app/node_modules/react-dom/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/react-dom/cjs/react-dom.production.min.js?commonjs-exports
 /app/node_modules/react-dom/cjs/react-dom.production.min.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/scheduler/index.js?commonjs-module
 /app/node_modules/scheduler/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/scheduler/cjs/scheduler.production.min.js?commonjs-exports
 /app/node_modules/scheduler/cjs/scheduler.production.min.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/use-sync-external-store/shim/index.js?commonjs-module
 /app/node_modules/use-sync-external-store/shim/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js?commonjs-exports
 /app/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js?commonjs-exports
 /app/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/react-is/index.js?commonjs-module
 /app/node_modules/react-is/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/react-is/cjs/react-is.production.min.js?commonjs-exports
 /app/node_modules/react-is/cjs/react-is.production.min.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js?commonjs-exports
 /app/node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/htmlparser2/lib/index.js?commonjs-exports
 /app/node_modules/htmlparser2/lib/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/htmlparser2/lib/Parser.js?commonjs-exports
 /app/node_modules/htmlparser2/lib/Parser.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/htmlparser2/lib/Tokenizer.js?commonjs-exports
 /app/node_modules/htmlparser2/lib/Tokenizer.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/entities/lib/decode.js?commonjs-exports
 /app/node_modules/entities/lib/decode.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/entities/lib/generated/decode-data-html.js?commonjs-exports
 /app/node_modules/entities/lib/generated/decode-data-html.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/entities/lib/generated/decode-data-xml.js?commonjs-exports
 /app/node_modules/entities/lib/generated/decode-data-xml.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/entities/lib/decode_codepoint.js?commonjs-exports
 /app/node_modules/entities/lib/decode_codepoint.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domhandler/lib/index.js?commonjs-exports
 /app/node_modules/domhandler/lib/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domelementtype/lib/index.js?commonjs-exports
 /app/node_modules/domelementtype/lib/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domhandler/lib/node.js?commonjs-exports
 /app/node_modules/domhandler/lib/node.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domutils/lib/index.js?commonjs-exports
 /app/node_modules/domutils/lib/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domutils/lib/stringify.js?commonjs-exports
 /app/node_modules/domutils/lib/stringify.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/dom-serializer/lib/index.js?commonjs-exports
 /app/node_modules/dom-serializer/lib/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/entities/lib/index.js?commonjs-exports
 /app/node_modules/entities/lib/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/entities/lib/encode.js?commonjs-exports
 /app/node_modules/entities/lib/encode.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/entities/lib/generated/encode-html.js?commonjs-exports
 /app/node_modules/entities/lib/generated/encode-html.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/entities/lib/escape.js?commonjs-exports
 /app/node_modules/entities/lib/escape.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/dom-serializer/lib/foreignNames.js?commonjs-exports
 /app/node_modules/dom-serializer/lib/foreignNames.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domutils/lib/traversal.js?commonjs-exports
 /app/node_modules/domutils/lib/traversal.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domutils/lib/manipulation.js?commonjs-exports
 /app/node_modules/domutils/lib/manipulation.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domutils/lib/querying.js?commonjs-exports
 /app/node_modules/domutils/lib/querying.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domutils/lib/legacy.js?commonjs-exports
 /app/node_modules/domutils/lib/legacy.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domutils/lib/helpers.js?commonjs-exports
 /app/node_modules/domutils/lib/helpers.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/domutils/lib/feeds.js?commonjs-exports
 /app/node_modules/domutils/lib/feeds.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/is-plain-object/dist/is-plain-object.js?commonjs-exports
 /app/node_modules/is-plain-object/dist/is-plain-object.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/parse-srcset/src/parse-srcset.js?commonjs-module
 /app/node_modules/parse-srcset/src/parse-srcset.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/picocolors/picocolors.browser.js?commonjs-module
 /app/node_modules/picocolors/picocolors.browser.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/postcss/lib/symbols.js?commonjs-exports
 /app/node_modules/postcss/lib/symbols.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es6.object.assign.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es6.object.assign.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/_global.js?commonjs-module
 /app/node_modules/core-js/library/modules/_global.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/_core.js?commonjs-module
 /app/node_modules/core-js/library/modules/_core.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/_shared.js?commonjs-module
 /app/node_modules/core-js/library/modules/_shared.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/_object-gops.js?commonjs-exports
 /app/node_modules/core-js/library/modules/_object-gops.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es6.object.define-property.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es6.object.define-property.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/babel-runtime/helpers/typeof.js?commonjs-exports
 /app/node_modules/babel-runtime/helpers/typeof.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es6.string.iterator.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es6.string.iterator.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/_wks.js?commonjs-module
 /app/node_modules/core-js/library/modules/_wks.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/web.dom.iterable.js?commonjs-exports
 /app/node_modules/core-js/library/modules/web.dom.iterable.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/_wks-ext.js?commonjs-exports
 /app/node_modules/core-js/library/modules/_wks-ext.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es6.symbol.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es6.symbol.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/_meta.js?commonjs-module
 /app/node_modules/core-js/library/modules/_meta.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/_object-gopn-ext.js?commonjs-exports
 /app/node_modules/core-js/library/modules/_object-gopn-ext.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/_object-gopn.js?commonjs-exports
 /app/node_modules/core-js/library/modules/_object-gopn.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/_object-gopd.js?commonjs-exports
 /app/node_modules/core-js/library/modules/_object-gopd.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es6.object.to-string.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es6.object.to-string.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es7.symbol.async-iterator.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es7.symbol.async-iterator.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es7.symbol.observable.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es7.symbol.observable.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es6.object.set-prototype-of.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es6.object.set-prototype-of.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es6.object.create.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es6.object.create.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es6.object.get-prototype-of.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es6.object.get-prototype-of.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/add-dom-event-listener/lib/EventObject.js?commonjs-module
 /app/node_modules/add-dom-event-listener/lib/EventObject.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/add-dom-event-listener/lib/EventBaseObject.js?commonjs-module
 /app/node_modules/add-dom-event-listener/lib/EventBaseObject.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/core-js/library/modules/es6.array.from.js?commonjs-exports
 /app/node_modules/core-js/library/modules/es6.array.from.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/performance-now/lib/performance-now.js?commonjs-module
 /app/node_modules/performance-now/lib/performance-now.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/html-dom-parser/lib/client/utilities.js?commonjs-exports
 /app/node_modules/html-dom-parser/lib/client/utilities.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/html-dom-parser/lib/client/constants.js?commonjs-exports
 /app/node_modules/html-dom-parser/lib/client/constants.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/react-property/lib/index.js?commonjs-exports
 /app/node_modules/react-property/lib/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/react-property/lib/possibleStandardNamesOptimized.js?commonjs-exports
 /app/node_modules/react-property/lib/possibleStandardNamesOptimized.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/style-to-js/cjs/index.js?commonjs-exports
 /app/node_modules/style-to-js/cjs/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/style-to-object/index.js?commonjs-module
 /app/node_modules/style-to-object/index.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/style-to-js/cjs/utilities.js?commonjs-exports
 /app/node_modules/style-to-js/cjs/utilities.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/lodash/lodash.min.js?commonjs-module
 /app/node_modules/lodash/lodash.min.js?commonjs-proxy
Duplicated module found:
 /app/node_modules/lodash/fp/_mapping.js?commonjs-exports
 /app/node_modules/lodash/fp/_mapping.js?commonjs-proxy

@BadLice
Copy link

BadLice commented Oct 27, 2023

I have exactly the same problem

@lsdsjy
Copy link
Contributor

lsdsjy commented Dec 5, 2023

#13906 probably fixed this issue?

@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: deps optimizer Esbuild Dependencies Optimization p4-important Violate documented behavior or significantly improves performance (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.