question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

build(ivy): unable to write a reference to MatCardModule

See original GitHub issue

I recently upgraded to Angular 9.0 using Ivy, ther is a new error appeared

Compiling @angular/material/tree : es2015 as esm2015

ERROR in Unable to write a reference to MatCardModule 
 in D:/Downloads/__projects/dev/NodeJs/almogtama3/node_modules/@angular/material/card/card-module.d.ts 
 from ngx-content/view/module.ts
# ngx-content/view/module.ts:
export { MatCardModule } from "@angular/material/card";
  • all other material modules have been compiled without any problem
  • adding "enableIvy": false to angularCompilerOptions solves the issue.
# dependencies:

"dependencies": {
    "@angular/animations": "~9.1.3",
    "@angular/cdk": "~9.2.1",
    "@angular/common": "~9.1.3",
    "@angular/compiler": "~9.1.3",
    "@angular/core": "~9.1.3",
    "@angular/fire": "^5.4.2",
    "@angular/forms": "~9.1.3",
    "@angular/material": "^9.2.1",
    "@angular/platform-browser": "~9.1.3",
    "@angular/platform-browser-dynamic": "~9.1.3",
    "@angular/platform-server": "~9.1.3",
    "@angular/router": "~9.1.3",
    "@angular/service-worker": "~9.1.3",
    "@fortawesome/angular-fontawesome": "^0.5.0",
    "@fortawesome/fontawesome-svg-core": "^1.2.28",
    "@fortawesome/free-brands-svg-icons": "^5.13.0",
    "@fortawesome/free-solid-svg-icons": "^5.13.0",
    "@nguniversal/express-engine": "^8.2.6",
    "@nguniversal/module-map-ngfactory-loader": "8.1.1",
    "@ngx-formly/core": "^5.6.0",
    "@ngx-formly/material": "^5.6.0",
    "@ngx-formly/schematics": "^5.6.0",
    "@ngx-share/button": "^7.1.4",
    "@ngx-share/buttons": "^7.1.4",
    "@ngx-share/core": "^7.1.4",
    "cors": "^2.8.5",
    "express": "^4.15.2",
    "firebase": "^7.14.1",
    "firebase-admin": "^8.11.0",
    "firebase-functions": "^3.6.0",
    "firebase-tools": "^7.16.2",
    "formidable": "^1.2.2",
    "mongoose": "^5.9.10",
    "multer": "^1.4.2",
    "ng-lazyload-image": "^7.1.0",
    "ngx-formly-material-file": "^1.0.0",
    "ngx-highlightjs": "^4.0.2",
    "ngx-quill": "^7.3.12",
    "node-loader": "^0.6.0",
    "parse-domain": "^2.3.4",
    "quill": "^1.3.7",
    "rxjs": "~6.5.5",
    "sharp": "^0.25.2",
    "shortid": "^2.2.15",
    "terser": "^4.6.11",
    "tslib": "^1.11.1",
    "zone.js": "~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.803.26",
    "@angular-devkit/build-ng-packagr": "^0.803.26",
    "@angular/cli": "^9.1.3",
    "@angular/compiler-cli": "~9.1.3",
    "@angular/language-service": "~9.1.3",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.12.37",
    "codelyzer": "^5.2.2",
    "cross-env": "^6.0.3",
    "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.5.3",
    "ng-packagr": "^5.4.0",
    "protractor": "^5.4.4",
    "ts-loader": "^5.2.0",
    "ts-node": "~7.0.0",
    "tsickle": "^0.37.0",
    "tslint": "~5.15.0",
    "typescript": "^3.8.3",
    "webpack-cli": "^3.3.11"
  }
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true,
    "generateDeepReexports": true
  }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
marosoftcommented, Apr 27, 2020

Please submit Angular Material questions here and issues here. This repo is for AngularJS Material.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 16, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 10: Unable to write a reference - Stack Overflow
I'm building a library and an app in the same project. My problem came when a interface definition was auto imported.
Read more >
Angular Ivy: Overcome the first obstacles - DEV Community ‍ ‍
Unable to write a reference to {X} from {Y}. I had a library (with using a path-alias) which exported multiple modules from directories ......
Read more >
Building an Angular Library with multiple entry points | Articles
First we need to create a new Angular workspace using the Angular CLI. ... Compiling with Angular sources in Ivy partial compilation mode....
Read more >
The Most Important Thing You Need To Understand About ...
The HelloModule now became part of the AppModule “template context” which sounds good but the application still fails with the same error?!
Read more >
Angular 9: what changes and why use it - Blexin
The Ivy compiler has been designed to remove parts of Angular that aren't ... Let's create a new project using the ng new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found