Webpack error while running the app


I am getting the error

TypeError: The ‘compilation’ argument must be an instance of Compilation

When I try to run “yarn rw dev”. This is odd because my app successfully runs on vercel with the same code, I just tried to set it up in a different device locally. I read about this online and saw that it was related to webpack mismatches.

I tried several solutions

  • added a “resolution” to package json
  • specified mismatching versions using “yarn why webpack”
  • deleted and re-installed node_modules

None of these seem to solve the issue. Did anyone face the same issue before? I’d appreciate some help. Thanks!

1 Like

What version of Redwood are you using?
Redwood has been using Vite instead of Webpack by default for a while now for everything except for Storybook.

Can you provide a reproduction project we can look at?

1 Like

I realized that I was using a very old version, and the problem was caused due to the incorrect camel case directory I was working in. Thanks!

1 Like