Skip to content
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

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

Open
maifeeulasad opened this issue Sep 14, 2021 · 1 comment

Comments

@maifeeulasad
Copy link

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.

@PopePAF
Copy link

PopePAF commented Nov 3, 2021

Same Problem here... I think this extension is just not ready for angular versions newer than 7...
It also has a dependencie to @angular/http which is deprecateed.

see:

  "peerDependencies": {
    "@angular/animations": "^7.1.4",
    "@angular/cdk": "^7.2.0",
    "@angular/common": "^7.1.4",
    "@angular/core": "^7.1.4",
    "@angular/http": "^7.1.4",
    "@angular/material": "^7.2.0",
    "@angular/platform-browser": "^7.1.4"
  }

Also after doing the sae changes like here: #110 (comment) it did actually work too... so it might not be that difficult to port this extension to newer versions?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants