Skip to content

Build fails after upgrading to Angular 12 #45

@kamulos

Description

@kamulos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions