Skip to content

Failed to compile entry-point @angular-material-extensions/link-preview (es2015 as esm2015) due to compilation errors: #112

@maifeeulasad

Description

@maifeeulasad

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Ubuntu 20.04 LTS

Versions

Angular CLI: 12.0.5
Node: 14.17.4
Package Manager: npm 7.20.6
OS: linux x64

Angular: 12.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.5
@angular-devkit/build-angular   12.0.5
@angular-devkit/core            12.0.5
@angular-devkit/schematics      12.0.5
@angular/cdk                    12.2.5
@angular/http                   7.2.16
@angular/material               12.2.5
@schematics/angular             12.0.5
rxjs                            6.6.7
typescript                      4.2.4

Repro steps

Just added deps in this repo: https://github.com/maifeeulasad/news-update/tree/develop
And in the app.module.ts:

  imports: [
    ...
    MatLinkPreviewModule
  ],

The log given by the failure

Error: Failed to compile entry-point @angular-material-extensions/link-preview (`es2015` as esm2015) due to compilation errors:
node_modules/@angular-material-extensions/link-preview/esm2015/link-preview.js:255:26 - error NG1010: Value at position 3 in the NgModule.imports of MatLinkPreviewModule is not a reference
  Value could not be determined statically.

255                 imports: [
                             ~
256                     CommonModule,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... 
261                     MatProgressSpinnerModule,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262                 ],
    ~~~~~~~~~~~~~~~~~

  node_modules/@angular-material-extensions/link-preview/esm2015/link-preview.js:259:21
    259                     MatCardModule,
                            ~~~~~~~~~~~~~
    Unknown reference.


Compiling @angular-material-extensions/link-preview : es2015 as esm2015
/home/maifee/Desktop/news-update/node_modules/@angular/compiler-cli/ngcc/src/execution/tasks/completion.js:57
            throw new Error(createErrorMessage(fs, task, message));
            ^

Error: Failed to compile entry-point @angular-material-extensions/link-preview (`es2015` as esm2015) due to compilation errors:
node_modules/@angular-material-extensions/link-preview/esm2015/link-preview.js:255:26 - error NG1010: Value at position 3 in the NgModule.imports of MatLinkPreviewModule is not a reference
  Value could not be determined statically.

255                 imports: [
                             ~
256                     CommonModule,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... 
261                     MatProgressSpinnerModule,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262                 ],
    ~~~~~~~~~~~~~~~~~

  node_modules/@angular-material-extensions/link-preview/esm2015/link-preview.js:259:21
    259                     MatCardModule,
                            ~~~~~~~~~~~~~
    Unknown reference.

    at /home/maifee/Desktop/news-update/node_modules/@angular/compiler-cli/ngcc/src/execution/tasks/completion.js:57:19
    at /home/maifee/Desktop/news-update/node_modules/@angular/compiler-cli/ngcc/src/execution/tasks/completion.js:31:13
    at /home/maifee/Desktop/news-update/node_modules/@angular/compiler-cli/ngcc/src/execution/create_compile_function.js:69:21
    at SingleProcessExecutorSync.SingleProcessorExecutorBase.doExecute (/home/maifee/Desktop/news-update/node_modules/@angular/compiler-cli/ngcc/src/execution/single_process_executor.js:36:17)
    at /home/maifee/Desktop/news-update/node_modules/@angular/compiler-cli/ngcc/src/execution/single_process_executor.js:57:59
    at SyncLocker.lock (/home/maifee/Desktop/news-update/node_modules/@angular/compiler-cli/ngcc/src/locking/sync_locker.js:34:24)
    at SingleProcessExecutorSync.execute (/home/maifee/Desktop/news-update/node_modules/@angular/compiler-cli/ngcc/src/execution/single_process_executor.js:57:27)
    at Object.mainNgcc (/home/maifee/Desktop/news-update/node_modules/@angular/compiler-cli/ngcc/src/main.js:74:25)
    at Object.process (/home/maifee/Desktop/news-update/node_modules/@angular/compiler-cli/ngcc/index.js:29:23)
    at NgccProcessor.processModule (/home/maifee/Desktop/news-update/node_modules/@ngtools/webpack/src/ngcc_processor.js:164:16)

Process finished with exit code 1

Desired functionality

Mention any other details that might be useful

Found this issue: #110. As it doesn't have any solution, I created a new one.

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