Closed montella1507 closed 7 years ago
Agreed,
in the new beta10,
import {ComponentType} from '@angular/material'
is broken
@montella1507 @eyalewin Can you please provide more information?
package.json
that shows the dependenciespackage.json
"dependencies": { "@angular-redux/form": "^6.3.0", "@angular-redux/router": "^6.3.0", "@angular-redux/store": "^6.4.5", "@angular/animations": "4.2.2", "@angular/common": "4.2.2", "@angular/compiler": "4.2.2", "@angular/core": "4.2.2", "@angular/forms": "4.2.2", "@angular/http": "4.2.2", "@angular/material": "2.0.0-beta.10", "@angular/platform-browser": "4.2.2", "@angular/platform-browser-dynamic": "4.2.2", "@angular/router": "4.2.2", "@types/d3": "^4.5.0", "@types/hammerjs": "^2.0.34", "@types/jquery": "^2.0.33", "@types/jquery-mousewheel": "^3.1.4", "@types/lodash": "4.14.63", "@types/mcustomscrollbar": "^2.8.30", "@types/signalr": "^2.2.32", "ag-grid": "^8.0.1", "ag-grid-ng2": "^8.0.0", "angular-tree-component": "^3.2.4", "angular2-logger": "^0.6.0", "bdsm": "^1.0.2", "bootstrap": "^3.3.6", "d3": "^4.5.1", "dragula": "^3.7.2", "exports-loader": "^0.6.3", "font-awesome": "4.7.0", "generate-json-webpack-plugin": "^0.2.1", "hammerjs": "^2.0.8", "ie-shim": "^0.1.0", "imports-loader": "^0.6.5", "jquery": "^3.1.1", "jquery-mousewheel": "^3.1.13", "karma": "^0.13.22", "karma-chrome-launcher": "^2.0.0 ", "karma-coverage": "^1.0.0", "karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.0.0", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "1.8.0", "lodash": "^4.16.4", "malihu-custom-scrollbar-plugin": "^3.1.5", "material": "^0.1.1", "material-design-icons": "^3.0.1", "ng2-dragula": "^1.2.1", "ngx-bootstrap": "1.6.6", "redux": "^3.6.0", "redux-logger": "^2.6.1", "redux-observable": "^0.12.2", "rxjs": "5.3.0", "signalr": "^2.2.1", "tinymce": "4.6.5", "webpack-dashboard": "^0.2.0", "zip-webpack-plugin": "^0.3.0", "zone.js": "0.8.12" }
import {Injectable, ViewContainerRef, Component} from '@angular/core'; import {MdDialogRef, MdDialog, MdDialogConfig, ComponentType} from '@angular/material';
No, not using CLI
@eyalewin Thanks for the response. It looks like you don't have the new @angular/cdk
package installed.
Angular Material depends on that package and you should get a peer dependency warning if it's not installed.
You are definitely correct, though it is not written to do so in the Release comments, that one should install this package. will try now and update. thanks
It should be stated in the CHANGELOG.md
file: https://github.com/angular/material2/blob/master/CHANGELOG.md#breaking-changes-1
i am using angular-cli, ng-v:
@angular/cli: 1.2.4 node: 7.7.1 os: win32 x64 @angular/animations: 4.3.6 @angular/cdk: 2.0.0-beta.10 @angular/common: 4.3.6 @angular/compiler: 4.3.3 @angular/compiler-cli: 4.3.3 @angular/core: 4.3.6 @angular/forms: 4.3.6 @angular/http: 4.3.6 @angular/material: 2.0.0-beta.8 @angular/platform-browser: 4.3.6 @angular/platform-browser-dynamic: 4.3.6 @angular/router: 4.3.6 @angular/cli: 1.2.4
package.json
"dependencies": { "@angular/animations": "^4.3.4", "@angular/cdk": "^2.0.0-beta.8", "@angular/common": "^4.3.4", "@angular/compiler": "./dependency-overrides/compiler-4.3.3-fix.tgz", "@angular/compiler-cli": "4.3.3", "@angular/core": "^4.3.4", "@angular/forms": "^4.3.4", "@angular/http": "^4.3.4", "@angular/material": "2.0.0-beta.8", "@angular/platform-browser": "^4.3.4", "@angular/platform-browser-dynamic": "^4.3.4", "@angular/router": "^4.3.4",
@angular/compiler tar-ball is because of bug in https://github.com/angular/angular/issues/18170#issuecomment-325602018
if i go to node_modules... @angular/material and @angular/cdk .. both are beta.8
//shared.modul.ts import { MaterialModule } from '@angular/material';
imports: [ ... MaterialModule, ... ], providers: [], exports: [ ... MaterialModule, .... ]
it worked 1 days ago.. not now.
@montella1507 , try to delete all node_modules and npm i / yarn it again. I have it updated to beta.10
I have tried, but i will try again after npm cache clean.
@DevVersion, you are right. i've skipped on beta.8 waiting for the next release. Working now, thanks :)
Ah i figured it out...
"@angular/cdk": "^2.0.0-beta.8", "@angular/material": "2.0.0-beta.8",
pinned beta.8 in material but not pinned in cdk
= not compatible (beta.10 cdk - "Imports from @angular/cdk are now scoped to a specific sub-package. For example, if you previously had:" so @angular/material beta.8 could not import correctly from beta.10 cdk)
SOLVED. Thank you guys.
I am having a similar issue, can someone see what's wrong with my modules?
Angular CLI @angular/cli: 1.3.2 node: 6.10.3 os: win32 x64 @angular/animations: 4.3.6 @angular/cdk: 2.0.0-beta.8 @angular/common: 4.3.6 @angular/compiler: 4.3.6 @angular/core: 4.3.6 @angular/forms: 4.3.6 @angular/http: 4.3.6 @angular/material: 2.0.0-beta.8 @angular/platform-browser: 4.3.6 @angular/platform-browser-dynamic: 4.3.6 @angular/router: 4.3.6 @angular/cli: 1.3.2 @angular/compiler-cli: 4.3.6 @angular/language-service: 4.3.6
package.json "dependencies": { "@angular/animations": "^4.0.0", "@angular/cdk": "^2.0.0-beta.8", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/core": "^4.0.0", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0", "@angular/material": "^2.0.0-beta.8", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@angular/router": "^4.0.0", "@types/moment": "^2.13.0", "core-js": "^2.4.1", "hammerjs": "^2.0.8", "moment": "^2.18.1", "rxjs": "^5.1.0", "zone.js": "^0.8.4" }, "devDependencies": { "@angular/cli": "^1.2.7", "@angular/compiler-cli": "^4.0.0", "@angular/language-service": "^4.0.0", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "@angular/cdk": "^2.0.0-beta.8", "@angular/material": "^2.0.0-beta.8", "codelyzer": "~3.0.1", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", "ts-node": "~3.0.4", "tslint": "~5.3.2", "typescript": "~2.3.3" }
Thanks
@angular/cdk: 2.0.0-beta.8 @angular/material": "^2.0.0-beta.8",
you will have beta.10 material and beta.8 cdk with this settings... change @angular/material": "^2.0.0-beta.8", to @angular/material": "2.0.0-beta.8", or CDK to ^beta.8 - but you will have beta.10 then and there are breaking changes..
I updated to beta.10 for both and it still does not work:
"dependencies": {
"@angular/animations": "^4.3.6",
"@angular/cdk": "2.0.0-beta.10",
"@angular/common": "~4.3.1",
"@angular/compiler": "~4.3.1",
"@angular/core": "~4.3.1",
"@angular/forms": "~4.3.1",
"@angular/http": "~4.3.1",
"@angular/material": "2.0.0-beta.10",
"@angular/platform-browser": "~4.3.1",
"@angular/platform-browser-dynamic": "~4.3.1",
"@angular/platform-server": "~4.3.1",
"@angular/router": "~4.3.1",
"@angularclass/hmr": "~1.2.2",
"@angularclass/hmr-loader": "^3.0.4",
"@covalent/core": "^1.0.0-beta.6",
"core-js": "^2.4.1",
"http-server": "^0.9.0",
"ie-shim": "^0.1.0",
"reflect-metadata": "^0.1.10",
"rxjs": "~5.4.2",
"zone.js": "0.8.14"
},
I'm on this issue the whole day and I'm running out of ideas. So any help is very welcome
import { CdkTable} from '@angular/cdk/table' import { CdkTableModule } from '@angular/cdk/table';
@muehan I think your problem may be covalent. I don't think it is ready for material/cdk beta.10.
I had the same problem after simply deleting node_modules and running npm install.
I modified package.json to fix the version of @angular/material and @angular/cdk to "2.0.0-beta.8" and all worked again
right, both on beta.8 works. Many thanks
both on beta.8 works. I used covalent too
I'm having the same problem @angular/material e @angular/cdk 2.0.0-beta.10 does not work. Cannot found any module. Installing again the 2.0.0-beta.8 works! Thank you!
Hi,
I have the same problem: Have both @angular/material and @angular/cdk 2.0.0-beta.8 and have the issue
"dependencies": { "@agm/core": "1.0.0-beta.2", "@angular/animations": "4.3.6", "@angular/cdk": "2.0.0-beta.8", "@angular/cli": "1.3.2", "@angular/common": "4.3.6", "@angular/compiler": "4.3.6", "@angular/core": "4.3.6", "@angular/forms": "4.3.6", "@angular/http": "4.3.6", "@angular/material": "2.0.0-beta.8", "@angular/platform-browser": "4.3.6", "@angular/platform-browser-dynamic": "4.3.6", "@angular/platform-server": "4.3.6", "@angular/router": "4.3.6", "@types/file-saver": "0.0.1", "@types/shortid": "0.0.29", "angularfire2": "4.0.0-rc.1", "bootstrap": "4.0.0-beta", "core-js": "2.4.1", "cross-spawn": "5.1.0", "file-saver": "1.3.3", "firebase": "4.3.0", "hammerjs": "2.0.8", "rxjs": "5.4.3", "shortid": "2.2.8", "xlsx": "0.10.7", "zone.js": "0.8.17" }, "devDependencies": { "@angular/cli": "1.3.2", "@angular/compiler-cli": "4.3.6", "@angular/language-service": "4.3.6", "@types/jasmine": "2.5.45", "@types/node": "6.0.88", "codelyzer": "~3.0.1", "jasmine-core": "2.8.0", "jasmine-spec-reporter": "4.2.1", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "0.2.2", "protractor": "~5.1.2", "sw-precache": "5.2.0", "ts-node": "~3.0.4", "tslint": "~5.3.2", "typescript": "~2.3.3" }
Already have tried to remove node_modules and run npm i, no success...
Do you have any idea of how to solve this ?
I have one issue, can any one solve it please..?!
"export 'cdkPortalOutlet' was not found in '@angular/cdk/portal'
this warning message is displaying while i compile my project
I got a lot of export issues. I solved this by downgrading the @angular/material and @angular/cdk to 5.2.5 . The most recent version is 6.0.0
Hi, I am having below error. And i am using .net core 2 SPA
Object(...) is not a function at platform.es5.js:102 at Object../node_modules/@angular/cdk/esm5/platform.es5.js (platform.es5.js:104) at webpack_require__ (bootstrap:76) at Object../node_modules/@angular/cdk/esm5/a11y.es5.js (browser.js:4482) at webpack_require (bootstrap:76) at Object../node_modules/@angular/material/esm5/autocomplete.es5.js (forms.js:5669) at __webpack_require (bootstrap:76) at Object../node_modules/@angular/material/esm5/material.es5.js (list.es5.js:1356) at __webpack_require__ (bootstrap:76) at Object../src/app/core/material.module.ts (app.module.ts:62)
Hi, I am having below error. And i am using .net core 2 SPA
Object(...) is not a function at platform.es5.js:102 at Object../node_modules/@angular/cdk/esm5/platform.es5.js (platform.es5.js:104) at webpack_require (bootstrap:76) at Object../node_modules/@angular/cdk/esm5/a11y.es5.js (browser.js:4482) at webpack_require (bootstrap:76) at Object../node_modules/@angular/material/esm5/autocomplete.es5.js (forms.js:5669) at webpack_require (bootstrap:76) at Object../node_modules/@angular/material/esm5/material.es5.js (list.es5.js:1356) at webpack_require (bootstrap:76) at Object../src/app/core/material.module.ts (app.module.ts:62)
me too get the same thing Do we have any solution for it?
Solution Make sure docs are pointing to correct version. When reloading the page and selecting docs v6 again I see its not "ScrollingModule" but "ScrollDispatchModule" for v6. https://v6.material.angular.io/cdk/scrolling/api#directives
Original Question
I'm running into this issue with v6.4.7 of Material and Material CDK. Tried bumping as far down as 6.0.0 but get the same result (always for "ScrollingModule"). In the end I get:
Module '"/path/to/node_modules/@angular/cdk/scrolling"' has no exported member 'ScrollingModule'
My package json:
"dependencies": { "@angular/animations": "^6.1.10", "@angular/cdk": "6.4.7", "@angular/common": "^6.1.0", "@angular/compiler": "^6.1.0", "@angular/core": "^6.1.0", "@angular/flex-layout": "^6.0.0-beta.18", "@angular/forms": "^6.1.0", "@angular/http": "^6.1.0", "@angular/material": "6.4.7", "@angular/platform-browser": "^6.1.0", "@angular/platform-browser-dynamic": "^6.1.0", "core-js": "^2.5.4", "rxjs": "~6.2.0", "xlsx": "^0.15.0", "zone.js": "~0.8.26" }, "devDependencies": { "@angular-devkit/build-angular": "~0.8.0", "@angular/cli": "~6.2.9", "@angular/compiler-cli": "^6.1.0", "@angular/language-service": "^6.1.0", "@types/jasmine": "~2.8.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", "codelyzer": "~4.3.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~3.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~1.1.2", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.11.0", "typescript": "~2.9.2" }
any help is appreciated :)
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.
Bug, feature request, or proposal:
ther are tons of "export * was not found in '@angular/cdk' errors in build proccess..
What is the expected behavior?
Successfull build
What is the current behavior?
Propably bad references in new @angular/material package.