themyth92 / ngx-lightbox

Lightbox2 use with angular >= 5
MIT License
115 stars 66 forks source link

Not building with "ng build --prod" - Angular 7 #11

Closed PierreChavaroche closed 5 years ago

PierreChavaroche commented 5 years ago

Hello,

firstly, thanks for this great lib. I'll really enjoy to use it!

Unfortunately I'have a problem since I updated to Angular 7 (and "@angular-devkit/build-angular" to 0.10.5)

Error when trying to build with "ng build --prod": "lightbox-overlay.component.ngfactory.js is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format"

image

What I'm doing wrong? Or is there really a problem with the package?

Thank you very much!!

themyth92 commented 5 years ago

Ok tks for reporting. I will retest again with angular7 and will try to push a fix soon.

PierreChavaroche commented 5 years ago

That would be awesome. Thank you very much!

themyth92 commented 5 years ago

Hi there, i have tried locally and it seems fine. However, it only works after i do ng update. Can you check on your local after you do update everything, the package still throws any Error ? Here are the versions that I am using:

    "@angular/cli": "^7.0.5",
    "@angular/common": "^7.0.3",
    "@angular/compiler": "^7.0.3",
    "@angular/compiler-cli": "^7.0.3",
    "@angular/core": "^7.0.3",
    "@angular/platform-browser": "^7.0.3",
    "@angular/platform-browser-dynamic": "^7.0.3",
    "rxjs": "^6.3.3",
    "tslint": "^5.11.0",
    "typescript": "3.1.6",
    "webpack": "^4.25.1",
    "zone.js": "^0.8.26",
    "@angular-devkit/build-angular": "~0.10.5"
PierreChavaroche commented 5 years ago

Hi @themyth92 , the problem has been solved.

I've updated everything with ng update. Furthermore I've deleted symlinks to the node_modules folder, which are not necessary with Angular 7 anymore.

In opposite to the error message it is likely that the problem did not belong to this lib.

Thank you very much for your fast support and for this great lib!!

themyth92 commented 5 years ago

Anw that is a weird error, seems like all angular related needs to be updated for Angular7 to work. I will close this issue for now. Let me know if you have any other issues.