flex-layout icon indicating copy to clipboard operation
flex-layout copied to clipboard

@angular/flex-layout module.d.ts causes error NG6002 in Angular 9 with Ivy enabled.

Open mycroft16 opened this issue 6 years ago • 7 comments

Bug Report

What is the expected behavior?

Expected to compile without errors and the plugin to work.

What is the current behavior?

image

What are the steps to reproduce?

Providing a StackBlitz (or similar) is the best way to get the team to see your issue.

What is the use-case or motivation for changing an existing behavior?

I'm guessing this is some issue relating to the recent release of Angular 9, and the fact that flex-layout is in [email protected] right now and that all the bugs aren't quite worked out. I haven't seen anyone else with this specific issue either here or on the angular issue tracker, though there are some that appear related.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular CLI: 9.0.1 Node: 13.8.0 OS: win32 x64

Angular: 9.0.0 ... animations, cdk, common, compiler, compiler-cli, core, forms ... language-service, material, platform-browser ... platform-browser-dynamic, router Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.900.1 @angular-devkit/build-angular 0.900.1 @angular-devkit/build-optimizer 0.900.1 @angular-devkit/build-webpack 0.900.1 @angular-devkit/core 9.0.1 @angular-devkit/schematics 9.0.1 @angular/cli 9.0.1 @angular/flex-layout 9.0.0-beta.29 @ngtools/webpack 9.0.1 @schematics/angular 9.0.1 @schematics/update 0.900.1 rxjs 6.5.4 typescript 3.7.5 webpack 4.41.2

Is there anything else we should know?

mycroft16 avatar Feb 16 '20 10:02 mycroft16

If you can’t reproduce using StackBlitz, you’ll need to reproduce some other way that we can investigate. None of our apps have this issue, nor do countless other users who have successfully upgraded.

CaerusKaru avatar Feb 16 '20 10:02 CaerusKaru

Here is the repo on github. I uninstall @angular/flex-layout and everything works perfectly. I install put it in app.module.ts and that error occurs.

https://github.com/mycroft16/vote

mycroft16 avatar Feb 16 '20 10:02 mycroft16

This is not a minimal reproduction, there’s a lot going on in this repo. Please provide the minimal set of conditions for which this fails.

CaerusKaru avatar Feb 16 '20 14:02 CaerusKaru

I am facing a similar issue, I have created a new angular project installed Angular material did a test run with it. Installed Flex-layout and it started throwing the same error. I will attach my package.json for your reference. I created a new project just to reproduce this error.

{ "name": "app-test", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "~9.1.0-next.0", "@angular/cdk": "^9.0.0", "@angular/common": "~9.1.0-next.0", "@angular/compiler": "~9.1.0-next.0", "@angular/core": "~9.1.0-next.0", "@angular/flex-layout": "^9.0.0-beta.29", "@angular/forms": "~9.1.0-next.0", "@angular/material": "^9.0.0", "@angular/platform-browser": "~9.1.0-next.0", "@angular/platform-browser-dynamic": "~9.1.0-next.0", "@angular/router": "~9.1.0-next.0", "rxjs": "~6.5.4", "tslib": "^1.10.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.900.0", "@angular/cli": "~9.0.0", "@angular/compiler-cli": "~9.1.0-next.0", "@angular/language-service": "~9.1.0-next.0", "@types/node": "^12.11.1", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "codelyzer": "^5.1.2", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.1.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.0", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.15.0", "typescript": "~3.7.5" } }

shubhamkokul avatar Feb 16 '20 17:02 shubhamkokul

https://github.com/angular/angular/issues/35399 This issue contains the relevant fixes. It seems the postinstall ngcc stuff in Ivy gets a little knotted in itself sometimes. Numerous other people are running into the same issue with other packages as well as flex-layout. But a node modules delete and install solved it for me. will also try the suggested importHelpers fix in tsconfog.json. It seems to happen after repeated npm installs of different packages without a build of the app between for the postinstall to do its thing. Doing a fresh Angular 9 app and installing flex layout worked but doing it after installing a few others I ran into the same issue.

mycroft16 avatar Feb 16 '20 20:02 mycroft16

Closing as duplicate of angular/angular#35399

CaerusKaru avatar Feb 16 '20 21:02 CaerusKaru

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.