I am using the license-checker-webpack-plugin in my Angular project. When upgrading from Angular 11 to Angular 12, my build did not work anymore. This has never before been an issue.
Reproduce
For simplicity I create a repo: https://github.com/kamulos/angular-license-checker-bug
There are two commits: the first one is an untouched new Angular project created with the version 12.1.4 of the Angular CLI. The second commit inserts the license-checker-webpack-plugin into the project. To provide a webpack config the custom-webpack package is used.
Error
The error that occurs is:
An unhandled exception occurred: Cannot find module '/path/to/angular-license-checker-bug/node_modules/@angular-devkit/package.json'
This is of course true: there is no package.json in this folder. But this is also nowhere specified as a dependency. One of the subprojects in this folder is probably meant to be checked.
I am using the license-checker-webpack-plugin in my Angular project. When upgrading from Angular 11 to Angular 12, my build did not work anymore. This has never before been an issue.
Reproduce
For simplicity I create a repo: https://github.com/kamulos/angular-license-checker-bug
There are two commits: the first one is an untouched new Angular project created with the version 12.1.4 of the Angular CLI. The second commit inserts the license-checker-webpack-plugin into the project. To provide a webpack config the custom-webpack package is used.
Error
The error that occurs is:
This is of course true: there is no package.json in this folder. But this is also nowhere specified as a dependency. One of the subprojects in this folder is probably meant to be checked.