question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not compatible with alpha 75 / Webpack 5

See original GitHub issue

Hi, Docusaurus maintainer here

I’m testing the latest alpha 75 release (Webpack 5) on a few sites, and this one is failing to upgrade due to this plugin: https://github.com/nextauthjs/next-auth/pull/1826

Error: Conflict: Multiple chunks emit assets to the same filename server.bundle.js (chunks 179 and 462)
    at /Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/webpack/lib/Compilation.js:3864:12
    at /Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/webpack/lib/Cache.js:85:6
    at /Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/webpack/lib/Cache.js:39:11
    at /Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/webpack/lib/cache/IdleFileCachePlugin.js:66:9
    at /Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/webpack/lib/Cache.js:88:6
    at eval (eval at create (/Users/sebastienlorber/Desktop/projects/next-auth/www/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

You have webpack optimizations here:

    configureWebpack(config) {
      const generatedFilesDir = config.resolve.alias['@generated']
      languages = utils.generateLunrClientJS(generatedFilesDir, options.languages);
      // Ensure that algolia docsearch css is its own chunk
      return {
        optimization: {
          splitChunks: {
            cacheGroups: {
              algolia: {
                name: 'algolia',
                test: /algolia\.css$/,
                chunks: `all`,
                enforce: true,
                // Set priority higher than docusaurus single-css extraction
                priority: 60,
              },
            },
          },
        },
      };
    },

Removing these optimizations makes the plugin work again on alpha 75, so I suggest to remove those for now to ensure everybody can upgrade.

Not sure why this does not work anymore though, nor why we have this error message.

Was also wondering why you need this optimization, as the algolia code/plugin is already in a distinct package. Maybe it’s a legacy optim?

Unrelated: the call to generateLunrClientJS would probably be better in another lifecycle like contentLoaded() (but in practice it is probably not very important).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
slorbercommented, May 4, 2021

A temporary workaround is to publish your own fork, or use something like patch-package to fix it locally

0reactions
slorbercommented, May 11, 2021

thanks 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack 5 beta feedback · Issue #9802 - GitHub
webpack 5 is in beta phase now. This means major changes and features are done. Major breaking changes have been added.
Read more >
npm install issue : 27 vulnerabilities (16 moderate, 9 high, 2 ...
When I enter npm install in the relevant react project folder, ... har-validator@5.1.5: this library is no longer supported npm WARN ...
Read more >
Fixing Browser Compatibility Issues With CSS Opacity & RGBA
One solution is to use a fallback solid color(100% opacity) without any alpha value, ie without any opacity/transparency value. Browsers which ...
Read more >
Tobias Koppers @ React Day Berlin (@wSokra) / Twitter
's existing (non-Next) frontend, currently built with Webpack 5. first compile ... Components ◇ Support for TS, JSX, CSS & more Now open-source...
Read more >
WebP image format | Can I use... Support tables for ... - CanIUse
Image format (based on the VP8 video format) that supports lossy and lossless compression, as well as animation and alpha transparency.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found