Skip to content
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

material has no exported member 'ComponentType'. #913

Closed
ja5onkendall opened this issue Oct 6, 2017 · 9 comments · Fixed by #916
Closed

material has no exported member 'ComponentType'. #913

ja5onkendall opened this issue Oct 6, 2017 · 9 comments · Fixed by #916

Comments

@ja5onkendall
Copy link

ja5onkendall commented Oct 6, 2017

It looks like Material2 may have removed this ComponentType component.
A fresh install results in a build error.

ERROR in.... node_modules/@covalent/core/dialogs/services/dialog.service.d.ts

node_modules/@angular/material/material ...has no exported member 'ComponentType'.

@ja5onkendall
Copy link
Author

bug

@ja5onkendall
Copy link
Author

bug-location

@lincze
Copy link

lincze commented Oct 6, 2017

seemingly it is imported from

@angular/cdk/portal

now (it was a grep -r search, and two replacements)

diff --git a/src/app/components/components/dialogs/dialogs.component.ts b/src/app/components/components/dialogs/dialogs.component.ts
index 62a3eae..92af93b 100644
--- a/src/app/components/components/dialogs/dialogs.component.ts
+++ b/src/app/components/components/dialogs/dialogs.component.ts
@@ -3,6 +3,7 @@ import { Component, HostBinding } from '@angular/core';
 import { slideInDownAnimation } from '../../../app.animations';
 
 import { TdDialogService } from '../../../../platform/core';
+import { ComponentType } from '@angular/cdk/portal';
 
 @Component({
   selector: 'dialogs-demo',
diff --git a/src/platform/core/dialogs/services/dialog.service.ts b/src/platform/core/dialogs/services/dialog.service.ts
index 7fd9715..97a25ff 100644
--- a/src/platform/core/dialogs/services/dialog.service.ts
+++ b/src/platform/core/dialogs/services/dialog.service.ts
@@ -1,5 +1,6 @@
 import { Injectable, ViewContainerRef, Provider, SkipSelf, Optional } from '@angular/core';
-import { MatDialog, MatDialogRef, MatDialogConfig, ComponentType } from '@angular/material';
+import { MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material';
+import { ComponentType } from '@angular/cdk/portal';
 
 import { TdAlertDialogComponent } from '../alert-dialog/alert-dialog.component';
 import { TdConfirmDialogComponent } from '../confirm-dialog/confirm-dialog.component';

@megetron
Copy link

megetron commented Oct 6, 2017

I get this too:
/Users/guy/proj/client/node_modules/@covalent/core/dialogs/services/dialog.service.d.ts(2,52): error TS2305: Module '"/Users/guy/proj/casual_shipping/client/node_modules/@angular/material/material"' has no exported member 'ComponentType'.

@emoralesb05
Copy link
Contributor

emoralesb05 commented Oct 6, 2017

Im assuming you are all using beta.12 now in material which we havent tested yet, please downgrade to beta.11 for now while we add support for beta.12 since they introduced more breaking changes.

[email protected] supports only [email protected]

@megetron
Copy link

megetron commented Oct 6, 2017

after downgrade error was gone, thanks.

@lincze
Copy link

lincze commented Oct 6, 2017

you are right it became material beta.12.

maybe, it would be better to use fix version number in package.json, not the at least version. (i've just run "npm run reinstall", and voilá, material beta.12 was installed, under the hood, not beta.11. if i ran it some hours earlier it would be beta.11 now)

@emoralesb05
Copy link
Contributor

Thats why we also use yarn, if we wanna develop normally we use yarn install but keep npm open to test the latest dependencies.

@emoralesb05
Copy link
Contributor

Patch https://github.com/Teradata/covalent/releases/tag/v1.0.0-beta.8-1 has been released with material beta.12 support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants