Angular 9 "Export CDK_Table" Issue on NPM Install
Angular19-05-2020
I was containerizing the front-end of an application that was build in Angular 9
with Bootstrap
and Angular Material UI
. It was working on my developers’ local terminals. However, when I containerized it, several warnings and this error occurs.
What I Did?
Of course, I Googled my way into it. Tried the following according to the blogs:
- Cleared the
node_modules/
- Add or save the plugin
- Deleted the
package-lock.json
- Clear the cache
Any possible solution that worked on other developers, but did’ not work on me. Sad life.
Wait, I noticed something
After reading a blog again, one caught my attention and noticed the writer just executed the following:
npm install @angular/core
npm install @angular/common
npm install @angular/
However, when I opened the package.json
, these are already installed.
So, what now?
I tried to rearrange the lines of dependency
Before
"private": true,
"dependencies": {
"@angular/animations": "~9.0.5",
"@angular/cdk": "^9.2.1",
"@angular/compiler": "~9.0.5",
"@angular/forms": "~9.0.5",
"@angular/material": "^9.1.1",
"@angular/platform-browser": "~9.0.5",
"@angular/platform-browser-dynamic": "~9.0.5",
"@angular/router": "~9.0.5",
"@angular/core": "~9.0.5",
"@angular/common": "~9.0.5",
"angular-material": "^1.1.21",
"angular-ng-autocomplete": "latest",
"bootstrap": "^4.4.1",
"lodash": "^4.17.15",
"rxjs": "~6.5.4",
"sweetalert2": "^9.7.0",
"tslib": "^1.11.1",
"zone.js": "~0.10.2"
After
"private": true,
"dependencies": {
"@angular/animations": "~9.0.5",
"@angular/core": "~9.0.5",
"@angular/common": "~9.0.5",
"@angular/cdk": "^9.2.1",
"@angular/compiler": "~9.0.5",
"@angular/forms": "~9.0.5",
"@angular/material": "^9.1.1",
"@angular/platform-browser": "~9.0.5",
"@angular/platform-browser-dynamic": "~9.0.5",
"@angular/router": "~9.0.5",
"angular-material": "^1.1.21",
"angular-ng-autocomplete": "latest",
"bootstrap": "^4.4.1",
"lodash": "^4.17.15",
"rxjs": "~6.5.4",
"sweetalert2": "^9.7.0",
"tslib": "^1.11.1",
"zone.js": "~0.10.2"
Noticed the arrangement of these?
"@angular/core": "~9.0.5"
"@angular/common": "~9.0.5"
"@angular/cdk": "^9.2.1"
For some reason the when @angular/cdk
was added it was inserted at the top. Seems like all new plugins that were saved were at the top. But during npm install
that’s not the case for me.
The Result
- Most of the warnings were gone
- The
CDK_Table
issue was gone
Support
Thank you for being a valued reader of my blog! Your support means the world to me and helps me continue to create valuable content for you. Here are a few ways you can show your support:
- Share the Love: If you enjoy the articles, consider sharing them with your friends, family and social media followers. Sharing the content helps to reach a wider audience and grow a community that simply shares solving problems.
- Feedback is Appreciated: I value your feedback! Let me know what you think about the content, what topics you’d like to see more of and any suggestions you have for improving my blog. Your input helps me tailor the content to better serve you.
- Buy a Coffee: If you’d like to support financially, consider buying me a coffee. Your donation goes a long way in helping to cover the costs associated with running and maintaining the blog. Even a small contribution can make a big difference!