angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.36k stars 6.74k forks source link

tons of "export * was not found in '@angular/cdk' #6721

Closed montella1507 closed 7 years ago

montella1507 commented 7 years ago

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.

eyalewin-zz commented 7 years ago

Agreed, in the new beta10, import {ComponentType} from '@angular/material' is broken

devversion commented 7 years ago

@montella1507 @eyalewin Can you please provide more information?

eyalewin-zz commented 7 years ago
devversion commented 7 years ago

@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.

eyalewin-zz commented 7 years ago

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

devversion commented 7 years ago

It should be stated in the CHANGELOG.md file: https://github.com/angular/material2/blob/master/CHANGELOG.md#breaking-changes-1

montella1507 commented 7 years ago

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.

eyalewin-zz commented 7 years ago

@montella1507 , try to delete all node_modules and npm i / yarn it again. I have it updated to beta.10

montella1507 commented 7 years ago

I have tried, but i will try again after npm cache clean.

eyalewin-zz commented 7 years ago

@DevVersion, you are right. i've skipped on beta.8 waiting for the next release. Working now, thanks :)

montella1507 commented 7 years ago

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.

ridj87 commented 7 years ago

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

montella1507 commented 7 years ago

@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..

muehan commented 7 years ago

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

dmostroff commented 7 years ago

import { CdkTable} from '@angular/cdk/table' import { CdkTableModule } from '@angular/cdk/table';

mike-hanson commented 7 years ago

@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

muehan commented 7 years ago

right, both on beta.8 works. Many thanks

frankyaorenjie commented 7 years ago

both on beta.8 works. I used covalent too

samuelthiago commented 7 years ago

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!

darwiin commented 6 years ago

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 ?

Sakkeer commented 6 years ago

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

fadrian9006 commented 6 years ago

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

lngtechnologies commented 5 years ago

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)

devamiya commented 5 years ago

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?

a-reimer commented 5 years ago

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 :)

angular-automatic-lock-bot[bot] commented 5 years ago

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.