Giter Site home page Giter Site logo

Comments (13)

lzear avatar lzear commented on May 20, 2024 6

I just ran into this issue with worker-plugin 5.0.0 in a Next.js app. yarn list showed 2 different versions of webpack. Using yarn selective version resolutions solved the issue in my case.

  // package.json
  "resolutions": {
    "webpack": "4.44.2"
  }

from worker-plugin.

thundermann avatar thundermann commented on May 20, 2024 4

I just ran into this issue with worker-plugin 5.0.0 in a Next.js app. yarn list showed 2 different versions of webpack. Using yarn selective version resolutions solved the issue in my case.

  // package.json
  "resolutions": {
    "webpack": "4.44.2"
  }

After adding your webpack resolution, make sure to run yarn install.

from worker-plugin.

SPKorhonen avatar SPKorhonen commented on May 20, 2024 2

Seems to be duplicate of #27, no?

But as I commented there, please check if you have duplicate installs of webpack under your node_modules and dedupe them. It worked for me.

from worker-plugin.

developit avatar developit commented on May 20, 2024

What version of Webpack is this? The plugin only supports version 4. My guess is you're on 3 or 5.

from worker-plugin.

motiko avatar motiko commented on May 20, 2024

I get the same error with webpack 4.42.0
/node_modules/next/dist/build/webpack/loaders/next-babel-loader.js

from worker-plugin.

developit avatar developit commented on May 20, 2024

If anyone can provide a bit more information here that would be useful. Since this is a version incompatibility, screenshots aren't enough to figure out where the problem lies.

from worker-plugin.

AtticusFetch avatar AtticusFetch commented on May 20, 2024

Getting the same problem.
Happens inside a project built with NextJS, webpack version is 4.28.3, nextJS version is 7.0.2.
Checked node_modules, no duped webpacks there.
This is all info I have so far, not sure what else I could provide

from worker-plugin.

alvarovillafane avatar alvarovillafane commented on May 20, 2024

@SPKorhonen I have the same issue you commented on #27 with Angular 9.

Can you explain to me how to update the Webpack versions in Angular 9 to make them equal?

I'm not seeing any versioning of webpack in package.json or in angular.json to update.

from worker-plugin.

alvarovillafane avatar alvarovillafane commented on May 20, 2024

I just fixed in Angular 9 updating package.json to match a single webpack version across dependencies and then doing npm dedupe as explained in #58 (comment)

from worker-plugin.

developit avatar developit commented on May 20, 2024

I believe this may be fixed by 5.0.0?

from worker-plugin.

nickrttn avatar nickrttn commented on May 20, 2024

I just ran into this issue with worker-plugin 5.0.0 in a Next.js app. yarn list showed 2 different versions of webpack. Using yarn selective version resolutions solved the issue in my case.

  // package.json
  "resolutions": {
    "webpack": "4.44.2"
  }

After adding your webpack resolution, make sure to run yarn install.

I'm still seeing this error with the suggested fix using resolutions, using package versions [email protected] and [email protected]. Downgrading Next.js to 10.0.5 does work, but isn't ideal. Does anyone have other suggestions for fixes or workarounds?

from worker-plugin.

lzear avatar lzear commented on May 20, 2024

vercel/next.js#21740 (comment):

The resolutions no longer works as Next.js has webpack 4 + 5 inline now to allow for an easy opt-in in next.config.js

At this point, I don't see any other solutions than migrating to webpack 5, which seems to work for some people (vercel/next.js#22813).

from worker-plugin.

gustavomick avatar gustavomick commented on May 20, 2024

this seems to be working for us on a similar case
image
new webpack.ProvidePlugin({
'L': 'leaflet',
}),

from worker-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.