error NG2006: The directive DefaultLayoutDirective inherits its constructor from LayoutDirective, but the latter does not have an Angular decorator of its own
Bug Report
I get the following error while trying to serve an angular 9 App with Ivy enabled
node_modules/@angular/flex-layout/esm5/flex.es5.js:1067:5 - error NG2006: The directive DefaultFlexOrderDirective inherits its constructor from FlexOrderDirective, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of FlexOrderDirective's constructor. Either add a @Directive decorator to FlexOrderDirective, or add an explicit constructor to DefaultFlexOrderDirective.
"dependencies": { "@angular/animations": "9.0.0-rc.11", "@angular/cdk": "^9.0.0-rc.8", "@angular/common": "9.0.0-rc.11", "@angular/compiler": "9.0.0-rc.11", "@angular/compiler-cli": "9.0.0-rc.11", "@angular/core": "^9.0.0-rc.11", "@angular/flex-layout": "^7.0.0-beta.24", "@angular/forms": "9.0.0-rc.11", "@angular/http": "7.2.16", "@angular/localize": "^9.0.0-rc.11", "@angular/material": "^9.0.0-rc.8", "@angular/platform-browser": "9.0.0-rc.11", "@angular/platform-browser-dynamic": "9.0.0-rc.11", "@angular/platform-server": "9.0.0-rc.11", "@angular/router": "9.0.0-rc.11", "@angular/upgrade": "9.0.0-rc.11", "@fullcalendar/core": "^4.3.1", "@ng-bootstrap/ng-bootstrap": "5.2.1", "@ng-idle/core": "^8.0.0-beta.4", "@swimlane/ngx-graph": "^6.2.0", "angular-in-memory-web-api": "~0.9.0", "angular-svg-round-progressbar": "^3.0.1", "angular2-moment": "^1.9.0", "angular2-qrcode": "^2.0.3", "bootstrap": "^4.4.1", "chart.js": "2.9.3", "core-js": "^3.6.4", "default-passive-events": "^1.0.10", "devextreme": "^19.2.5", "devextreme-angular": "^19.2.5", "jquery": "^3.4.1", "jqwidgets-scripts": "^9.0.0", "js-marker-clusterer": "^1.0.0", "ng2-pdf-viewer": "^6.0.2", "ngx-material-timepicker": "5.3.0", "ngx-print": "^1.2.0-beta.3", "popper.js": "^1.16.1", "primeng": "9.0.0-rc.3", "qz-tray": "^2.1.0-2", "rsvp": "^4.8.5", "rxjs": "^6.5.4", "rxjs-compat": "^6.5.4", "sha": "^3.0.0", "stream": "0.0.2", "tslib": "^1.10.0", "web-animations-js": "^2.3.2", "ws": "^7.2.1", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "^0.900.0-rc.10", "@angular/cli": "^9.0.0-rc.10", "@types/chart.js": "^2.9.11", "@types/googlemaps": "^3.39.2", "@types/jasmine": "^3.5.2", "@types/jasminewd2": "^2.0.8", "@types/node": "^13.5.1", "jasmine": "~3.5.0", "jasmine-core": "~3.5.0", "karma": "^4.4.1", "karma-chrome-launcher": "^3.1.0", "karma-cli": "^2.0.0", "karma-jasmine": "^3.1.0", "karma-jasmine-html-reporter": "^1.5.1", "karma-phantomjs-launcher": "^1.0.2", "lodash": "^4.17.15", "phantomjs-prebuilt": "^2.1.7", "protractor": "^5.4.3", "ts-node": "^8.6.2", "tslint": "^6.0.0", "typescript": "3.7.5" }, "repository": {} }
You need to use the v9 version of Flex Layout.
How do I install it?
How do I install it? replace "@angular/flex-layout": "^7.0.0-beta.24" with "@angular/flex-layout": "^9.0.0-beta.29" However you should update your angular versions too. You're using "@angular/http": "7.2.16", That's quite old. You could try running "ng update @angular/core @angular/cli"
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.