-
Notifications
You must be signed in to change notification settings - Fork 12k
[Angular 12] The 'compilation' argument must be an instance of Compilation (Webpack 5) / webpack_1.util.cleverMerge is not a function (Webpack 4) #20786
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
Comments
@buu700, it's not clear how dependencies are managed in your project. The above errors indicated that you have the wrong version of Webpack installed in your application. Webpack is a direct dependency of Can you try deleting the package lock file and the node modules directory and then reinstalling? If the problem persists please provide the output of |
FYI, this may be caused by having the |
Thanks @mshima and @alan-agius4, that got me closer. I didn't realize that installing webpack directly in our package.json would cause issues. We use webpack separately from Angular as well, but having just I'm seeing something else now, but I think it's an unrelated issue, so I'm going to go ahead and create a new ticket. I'll also leave this ticket open in case this issue is still considered a bug in and of itself (or something that needs to be documented, if it isn't already).
Hm, are you sure that's an issue, and if so is it a problem that it's already a dependency of |
Duplicate of #20773 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report
Affected Package
Seems like an issue with
@angular-devkit/build-angular
and/or@ngtools/webpack
and/or@angular/compiler-cli
?Is this a regression?
Yes, the behavior was not reproducible with Angular 11 and webpack 4.
Description
Attempting to build (
ng build --aot true --common-chunk false --source-map false --vendor-chunk false
) fails with the error below.Minimal Reproduction
I can investigate further and try to put something together if needed, but our project code is at least available at https://github.com/cyph/cyph/tree/angular-42087-test.
Exception or Error
Angular 12 with Webpack 5:
Angular 12 with Webpack 4:
Your Environment
Angular Version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: