-
Notifications
You must be signed in to change notification settings - Fork 48
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
angular2-masonry won't compile under Angular 5 #61
Comments
Any work around for the time being? |
Temporary workaround is to bring the angular2-masonry into a sub-folder of your app. You can that include it as usual using: import { MasonryModule } from './angular2-masonry'; |
hello JaronrH error come=>>>>>>>>>>>>>>> ReferenceError: window is not defined if you running project via ng serve it will work fine |
Another workaround is to temporarily add the package in the include array of your tsconfig.json. My full tsconfig.json is this:
Note that by default there was no include present and I also had to add src/**/* into it to have full compilation of my project. |
I've forked this repository and updated it for Angular 5+ Works fine for me. I'll try to work on it more when I have time. |
@gethinoakes ty. 👍 |
Angular 5 Masonry Module with animations: https://github.com/Shailu4u/ng-masonry-grid |
Thanks Shailu4u this works for me. |
Angular 5 has stricter Typescript compilation configurations and will not compile:
node_modules/angular2-masonry/index.ts
The error is:
ERROR in ./node_modules/angular2-masonry/index.ts
Module build failed: Error: myapp/node_modules/angular2-masonry/index.ts is not part of the compilation output. Please check the other error messages for details.
This type script file is incorrectly packed in angular2-masonry according to the Angular team.
You should not package uncompiled .ts files in packages because it can compile diffferently under different configs.
Angular plans to make it even harder for you to use this bad practice in the future. YOur package is already broken for Angular 5.
Here's an Angular team member saying this: angular/angular-cli#8284
( see filipesilva 's comment )
The text was updated successfully, but these errors were encountered: