unmet dependency angular/cdk
Bug, feature request, or proposal:
BUG
What is the expected behavior?
ng serve should work
What is the current behavior?
compilation breaks:
ERROR in /Applications/MAMP/htdocs/memberhive2/web/node_modules/@angular/material/typings/core/core.d.ts (1,61): Cannot find module '@angular/cdk'.
ERROR in ./~/@angular/material/@angular/material.es5.js
Module not found: Error: Can't resolve '@angular/cdk' in '/Applications/MAMP/htdocs/memberhive2/web/node_modules/@angular/material/@angular'
@ ./~/@angular/material/@angular/material.es5.js 19:0-75
@ ./src/app/app-material.module.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
webpack: Failed to compile.
During yarn upgrade you get the following warning:
warning "@angular/[email protected]" has unmet peer dependency "@angular/[email protected]".
@DevVersion it may have something to do with 17cc4a198f336e8ebefbb2710d8e80df2595db7e?
What are the steps to reproduce?
Just open the Plunker example ... the console tells the story: https://goo.gl/DlHd6U
What is the use-case or motivation for changing an existing behavior?
continue with upgrades
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
TS 2.4.0 @angular/cli: 1.1.3 node: 8.0.0 os: darwin x64 @angular/animations: 4.2.4 @angular/common: 4.2.4 @angular/compiler: 4.2.4 @angular/core: 4.2.4 @angular/flex-layout: 2.0.0-rc.1 @angular/forms: 4.2.4 @angular/http: 4.2.4 @angular/material: 2.0.0-beta.7-51bf26e @angular/platform-browser: 4.2.4 @angular/platform-browser-dynamic: 4.2.4 @angular/router: 4.2.4 @angular/cli: 1.1.3 @angular/compiler-cli: 4.2.4 @angular/platform-server: 4.2.4
Is there anything else we should know?
I am pulling from the master branch, updating almost daily. Yesterday morning the update did not break the build.
Good point. Maybe it would make sense to refer for material2 builds to the cdk builds on GitHub.
I will start looking into this today
I get the same error. for what its worth: i get the following errors after an npm install which includes @angular/[email protected]
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
up to date in 3.194s
PS C:\dev\material2-start> npm install @angular/[email protected]
npm ERR! code E404
npm ERR! 404 Not Found: @angular/[email protected]
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Tom Devolder\AppData\Roaming\npm-cache\_logs\2017-06-23T07_26_44_976Z-debug.log
Is there any temporary solution?
@arkhamvm for now just revert back to "@angular/material": "2.0.0-beta.7". I am sure it will be fixed by tomorrow.
@axtho thanks.
not fixed for today :( 2.0.0-beta.8
same issue for me. I went back to 2.0.0-beta.7 to be able to go on with my code
Do you have installed @angular/cdk?
npm install --save @angular/material @angular/cdk from documentation helped me too
And just... do not forget to import CdkTableModule (if you are using MdTableModule).
npm install --save @angular/cdk resolved it.
I would call this a breaking change.
@jdell64 so would I

Nice! I assumed you all followed the same versioning as angular, so when breaking changes happen, you'd bump the Major version number. I guess its tough to do so when the milestones for 2 aren't there yet, so that was my confusion. (certainly not complaining! love MD)
Yeah, during beta every release may still have breaking changes. Once beta is over the library will follow the same semver conventions as Angular.
latest version Material : bug (Error)
ERROR in ./~/@angular/material/@angular/material.es5.js Module build failed: Error: ENOENT: no such file or directory, open 'C:\blog\blog-src\node_modules@angular\material@angular\material.es5.js' at Error (native) @ ./src/app/app.module.ts 19:0-96 @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
ERROR in ./~/@angular/animations/@angular/animations/browser.es5.js Module build failed: Error: ENOENT: no such file or directory, open 'C:\blog\blog-src\node_modules@angular\animations@angular\animations\browser.es5.js' at Error (native) @ ./~/@angular/platform-browser/@angular/platform-browser/animations.es5.js 10:0-206 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
Fix : Downgrade to one lower version of material :
In case you had a previous version of material or cdk, remove them first (npm remove) before reinstalling them.
npm install --save @angular/[email protected] resolved it.
go with: npm install --save @angular/material@latest `-- @angular/[email protected]
npm install --save @angular/cdk@latest `-- @angular/[email protected]
Back to "@angular/cdk": "2.0.0-beta.11", and @angular/material": "2.0.0-beta.11"