angular-material-extensions / link-preview

Angular open source UI library to preview web links
https://angular-material-extensions.github.io/link-preview
MIT License
58 stars 18 forks source link

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

Open javatutorials2016 opened 4 years ago

javatutorials2016 commented 4 years ago

Bug Report or Feature Request (mark with an x)

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

OS and Version?

Versions

Repro steps

The log given by the failure

ERROR in 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: [object Object]

255 imports: [ ~ 256 CommonModule,

... 
261                     MatProgressSpinnerModule,

262 ],


### Desired functionality
<!--
What would like to see implemented?
What is the usecase?
-->

### Mention any other details that might be useful
<!-- Please include a link to the repo if this is related to an OSS project. -->
SudhaChandrann commented 3 years ago

I am facing the same issue

WARNING in Entry point 'ngx-linkifyjs' contains deep imports into '......./node_modules/linkifyjs/plugins/hashtag', '....../node_modules/linkifyjs/plugins/mention', '...../node_modules/linkifyjs/string'. This is probably not a problem, but may cause the compilation of entry points to be out of order.

ERROR in 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: [object Object]

255 imports: [ ~ 256 CommonModule,

... 
261                     MatProgressSpinnerModule,

262 ],

OS: macOS Catalina

HasanAboShally commented 3 years ago

I'm facing the same issue. Any help please?

SudhaChandrann commented 3 years ago

I'm facing the same issue. Any help please?

I was using Angular 10, seems it works after downgrading to Angular7 as mentioned in dependencies.

brodriguezmilla commented 3 years ago

The full error should include the mention of ```node_modules/@angular-material-extensions/link-preview/esm2015/link-preview.js:259:21 259 MatCardModule, Unknown reference.


The file @angular-material-entensions/link-preview/esm2015/link-preview.js uses ```import { MatCardModule, MatButtonModule, MatProgressSpinnerModule } from '@angular/material';```
I assume that in Angular 10, MatCardModule is no longer called/found in that path. Changing it to ```import { MatCardModule } from '@angular/material/card';
import { MatButtonModule,  } from '@angular/material/button';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';``` made the error go away.  And no, this is not the solution explicitly, as I just modified this directly in the node_modules/@angular-material-extensions/.../link-preview file directly to check if the error would go away.
filipencus commented 3 years ago

Any news on this? I am stuck here for days...