-
Notifications
You must be signed in to change notification settings - Fork 772
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
Cannot compile with typescript 3.1.1 #851
Comments
We'll need to wait for Material to update to TS v3.1.x before we move, because we have a peer dependency on the CDK. They'll likely update once Angular v7 goes into RC in the next few weeks. |
Angular 7 RC is out, Angular Material and CDK has a beta, is there any way i can use flex-layout with ng 7rc ? |
Blocked on angular/components#13384 |
material2 7.0.0-rc.0 release |
Yep, thankfully angular/components#13384 and angular/components#13359 were merged and 7.0.0-rc.0 has been released. This library and @angular/fire are the two holding me back from fully testing the RC atm. Thanks for the hard work @CaerusKaru! |
I've added the necessary patches in #855, and CI looks good, so we should be able to get this merged into the nightly tomorrow, targeting a 7.0.0 release either late this week or early next week. |
* Upgrade to Angular v7 * Upgrade to Angular Material v7 * Add nostrictPropertyInitialization flag * Add noUnusedLocals flag and remove tslint option * Add noImplicitThis flag * Add noImplicitAny flag * Enable strictMetadataEmit flag * Various refactors to support the above flags * Switch to yarn Fixes #851
I installed the nightly via
I'm not sure if I need to wait for the NPM release or if I'm doing something wrong here. I tried the instructions here including |
You’re not doing anything wrong. Somehow along the way I did everything except actually upgrade the version of TS. I’ll do that now. |
@Splaktar should be fixed with latest commit. Please let me know of any ill-effects by filing a new issue. |
@CaerusKaru When the Beta.19 will be released? Thanks for the great work! |
Thanks, #860 does indeed resolve this for me in the latest build. |
setup Angular Material properly since ng add failed build errors due to angular/flex-layout#851
use previous version of flex i.e before 7.0.0-beta.19 npm install @angular/flex-layout@6.0.0-beta.18 |
Getting this error
|
@Splaktar i am using windows 7 ultimate. Now i am implementing the command ng update and will send you the update |
@Splaktar Thanks for your suggestions. I got resolved the issues by using Command |
adding my experience of 30 minutes 35 seconds for completion of |
This is a shame, i can't use this in my Angular CLI 7 project, i guess someone found found a real solution because no one presented here works to me |
This worked for me using the latest angular cli, two commands: |
I just run
|
This worked for me, thanks.. i had to use |
I had some issues with 7.0.0-beta-19. As reported by others previously it had issues if you did not use the correct version of TypeScript. For me, I was still on TypeScript 2.4.2. Flex-layout 6.0.0-beta.18 failed for me as well. Hope that helped someone here. |
I had just migrated a project from Angular 6 to 7 and got the error above. UPDATE package.json (3868 bytes) |
I still get this error on running [ng update --all], any help appreciated!! error TS2322: Type 'MediaQueryListEvent' is not assignable to type 'MediaQueryList'. error TS2322: Type 'MediaQueryListEvent' is not assignable to type 'MediaQueryList'. Package Version@angular-devkit/architect 0.11.0 |
Have you tried with “Flex-layout 6.0.0-beta.18”? |
No luck, It asked me to downgrade angular to 6, but since its just a warning, I ignored and still got a bunch of errors ERROR in node_modules/@angular/flex-layout/core/typings/match-media/mock/mock-match-media.d.ts(25,15): error TS2416: Property '_registry' in type 'MockMatchMedia' is not assignable to the same property in base type 'MatchMedia'. |
@darkyelox - Can you post your ng version ? I too tried all work arounds on this page and still no luck |
I changed my code from commented line to the one below and it started working. I believe the latest 7.1.1 has changed code or fixed it. Am less than a week into angular/web technologies, I appreciate if someone can explain if this is right way to fix it or is there a better way to do it? Code snippet:
|
@Splaktar - thanks, it helps. |
If anyone still has that problem and nothing worked, I have another fix.
|
the problem persists for me, I have angular v7, and I have tested with flex-layout beta 18 and 19, in both I have the same error, changing typescript version, and with @cadaats 's snippet.
admin-layout.component.ts(54,9)
Package version "typescript": "3.1.6", |
Unfortunately I have the same problem as @cristtopher |
@cristtopher / @PiotrGutowski - my snippet doesn't assign mql, but re-assign the matchmedia statement (remove the *** and try it) |
@cadaats Great , it works! Thanks |
This is a good point about using angular 7.x with flex layout 7.x. I landed here after rolling back this package to the latest 6.x because I'm having issues with breakpoints & media queries in 7.0.0-beta.19 (beta.22 along with #945 should fix that 🙏). The rollback worked great for the UI, but the frontend tests won't build, so for anyone trying to do what I did, you will have to use angular 7.x with flex-layout 7.x. |
ng update --all worked for me after that got below issue ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.3.0 but 3.3.3 was found instead. in angular 7 solved it using npm i typescript@3.1.6 --save-dev --save-exact |
I ran |
Update to FlexLayout to @angular/flex-layout@7.0.0-beta.24
It worked for me. |
Still getting this error with:
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report
What is the expected behavior?
Cannot compile with typescript 3.1.1
What is the current behavior?
Im getting following errors:
What are the steps to reproduce?
Compile app using typescript 3.1.1 and flex-layout 6.0.0-beta.18
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: