question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module... Problems with cdk

See original GitHub issue

Bug, feature request, or proposal:

  • Bug

What is the expected behavior?

Application will run

What is the current behavior?

Angular Material throw error

What are the steps to reproduce?

Install all dependencies and run aplication which use angular material

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

  • Angular 5.0.0
  • Material 5.0.0-rc0
  • Windows 10
  • TypeScript 2.6.1

Log `C:\Users\Erik\WebstormProjects\FellCMS>ng serve ** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** Date: 2017-11-08T14:57:50.207Z Hash: c7798f1f7c0d306126a4 Time: 7912ms chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered] chunk {main} main.bundle.js (main) 2.93 kB [initial] [rendered] chunk {polyfills} polyfills.bundle.js (polyfills) 636 bytes [initial] [rendered] chunk {styles} styles.bundle.js (styles) 150 kB [initial] [rendered] chunk {vendor} vendor.bundle.js (vendor) 853 kB [initial] [rendered]

ERROR in node_modules/@angular/material/autocomplete/typings/autocomplete-trigger.d.ts(8,32): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/autocomplete/typings/autocomplete-trigger.d.ts(9,67): error TS2307: Cannot find module ‘@angular/cdk/overlay’. node_modules/@angular/material/autocomplete/typings/autocomplete.d.ts(10,44): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/button-toggle/typings/button-toggle.d.ts(11,30): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/button-toggle/typings/button-toggle.d.ts(12,43): error TS2307: Cannot find module ‘@angular/cdk/collections’. node_modules/@angular/material/button/typings/button.d.ts(9,26): error TS2307: Cannot find module ‘@angular/cdk/platform’. node_modules/@angular/material/button/typings/button.d.ts(11,30): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/checkbox/typings/checkbox.d.ts(4,30): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/chips/typings/chip-list.d.ts(8,33): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/chips/typings/chip-list.d.ts(9,32): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/chips/typings/chip-list.d.ts(10,32): error TS2307: Cannot find module ‘@angular/cdk/collections’. node_modules/@angular/material/chips/typings/chip.d.ts(8,33): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/core/typings/ripple/ripple-renderer.d.ts(9,26): error TS2307: Cannot find module ‘@angular/cdk/platform’. node_modules/@angular/material/core/typings/ripple/ripple.d.ts(9,26): error TS2307: Cannot find module ‘@angular/cdk/platform’. node_modules/@angular/material/datepicker/typings/datepicker.d.ts(8,32): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/datepicker/typings/datepicker.d.ts(9,67): error TS2307: Cannot find module ‘@angular/cdk/overlay’. node_modules/@angular/material/dialog/typings/dialog-config.d.ts(9,27): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/dialog/typings/dialog-container.d.ts(10,84): error TS2307: Cannot find module ‘@angular/cdk/portal’. node_modules/@angular/material/dialog/typings/dialog-container.d.ts(11,34): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/dialog/typings/dialog-ref.d.ts(8,28): error TS2307: Cannot find module ‘@angular/cdk/overlay’. node_modules/@angular/material/dialog/typings/dialog.d.ts(1,62): error TS2307: Cannot find module ‘@angular/cdk/overlay’. node_modules/@angular/material/dialog/typings/dialog.d.ts(2,31): error TS2307: Cannot find module ‘@angular/cdk/portal’. node_modules/@angular/material/expansion/typings/accordion.d.ts(1,30): error TS2307: Cannot find module ‘@angular/cdk/accordion’. node_modules/@angular/material/expansion/typings/expansion-panel-header.d.ts(1,30): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/expansion/typings/expansion-panel.d.ts(2,34): error TS2307: Cannot find module ‘@angular/cdk/accordion’. node_modules/@angular/material/expansion/typings/expansion-panel.d.ts(3,43): error TS2307: Cannot find module ‘@angular/cdk/collections’. node_modules/@angular/material/grid-list/typings/grid-list.d.ts(10,32): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/input/typings/autosize.d.ts(9,26): error TS2307: Cannot find module ‘@angular/cdk/platform’. node_modules/@angular/material/input/typings/input.d.ts(10,26): error TS2307: Cannot find module ‘@angular/cdk/platform’. node_modules/@angular/material/list/typings/selection-list.d.ts(8,50): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/list/typings/selection-list.d.ts(9,32): error TS2307: Cannot find module ‘@angular/cdk/collections’. node_modules/@angular/material/menu/typings/menu-directive.d.ts(9,27): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/menu/typings/menu-item.d.ts(8,33): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/menu/typings/menu-panel.d.ts(10,27): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/menu/typings/menu-trigger.d.ts(1,43): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/menu/typings/menu-trigger.d.ts(2,67): error TS2307: Cannot find module ‘@angular/cdk/overlay’. node_modules/@angular/material/progress-spinner/typings/progress-spinner.d.ts(10,26): error TS2307: Cannot find module ‘@angular/cdk/platform’. node_modules/@angular/material/radio/typings/radio.d.ts(11,43): error TS2307: Cannot find module ‘@angular/cdk/collections’. node_modules/@angular/material/radio/typings/radio.d.ts(12,30): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/select/typings/select.d.ts(8,44): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/select/typings/select.d.ts(9,32): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/select/typings/select.d.ts(10,32): error TS2307: Cannot find module ‘@angular/cdk/collections’. node_modules/@angular/material/select/typings/select.d.ts(11,103): error TS2307: Cannot find module ‘@angular/cdk/overlay’. node_modules/@angular/material/sidenav/typings/drawer.d.ts(9,61): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/sidenav/typings/drawer.d.ts(10,32): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/slide-toggle/typings/slide-toggle.d.ts(9,26): error TS2307: Cannot find module ‘@angular/cdk/platform’. node_modules/@angular/material/slide-toggle/typings/slide-toggle.d.ts(12,30): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/slider/typings/slider.d.ts(8,32): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/slider/typings/slider.d.ts(12,30): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/snack-bar/typings/snack-bar-config.d.ts(9,36): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/snack-bar/typings/snack-bar-config.d.ts(10,27): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/snack-bar/typings/snack-bar-container.d.ts(10,68): error TS2307: Cannot find module ‘@angular/cdk/portal’. node_modules/@angular/material/snack-bar/typings/snack-bar-ref.d.ts(8,28): error TS2307: Cannot find module ‘@angular/cdk/overlay’. node_modules/@angular/material/snack-bar/typings/snack-bar.d.ts(8,31): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/snack-bar/typings/snack-bar.d.ts(9,25): error TS2307: Cannot find module ‘@angular/cdk/overlay’. node_modules/@angular/material/snack-bar/typings/snack-bar.d.ts(10,31): error TS2307: Cannot find module ‘@angular/cdk/portal’. node_modules/@angular/material/snack-bar/typings/snack-bar.d.ts(15,36): error TS2307: Cannot find module ‘@angular/cdk/layout’. node_modules/@angular/material/sort/typings/sort-header.d.ts(9,30): error TS2307: Cannot find module ‘@angular/cdk/table’. node_modules/@angular/material/stepper/typings/step-header.d.ts(8,30): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/stepper/typings/step-label.d.ts(9,30): error TS2307: Cannot find module ‘@angular/cdk/stepper’. node_modules/@angular/material/stepper/typings/stepper-button.d.ts(1,52): error TS2307: Cannot find module ‘@angular/cdk/stepper’. node_modules/@angular/material/stepper/typings/stepper.d.ts(1,37): error TS2307: Cannot find module ‘@angular/cdk/stepper’. node_modules/@angular/material/table/typings/cell.d.ts(9,84): error TS2307: Cannot find module ‘@angular/cdk/table’. node_modules/@angular/material/table/typings/row.d.ts(1,66): error TS2307: Cannot find module ‘@angular/cdk/table’. node_modules/@angular/material/table/typings/table-data-source.d.ts(8,28): error TS2307: Cannot find module ‘@angular/cdk/table’. node_modules/@angular/material/table/typings/table.d.ts(1,26): error TS2307: Cannot find module ‘@angular/cdk/table’. node_modules/@angular/material/tabs/typings/tab-body.d.ts(10,49): error TS2307: Cannot find module ‘@angular/cdk/portal’. node_modules/@angular/material/tabs/typings/tab-body.d.ts(11,43): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/tabs/typings/tab-header.d.ts(8,43): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/tabs/typings/tab-header.d.ts(13,31): error TS2307: Cannot find module ‘@angular/cdk/scrolling’. node_modules/@angular/material/tabs/typings/tab-label.d.ts(9,27): error TS2307: Cannot find module ‘@angular/cdk/portal’. node_modules/@angular/material/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts(8,32): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts(9,26): error TS2307: Cannot find module ‘@angular/cdk/platform’. node_modules/@angular/material/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts(10,31): error TS2307: Cannot find module ‘@angular/cdk/scrolling’. node_modules/@angular/material/tabs/typings/tab.d.ts(8,32): error TS2307: Cannot find module ‘@angular/cdk/portal’. node_modules/@angular/material/toolbar/typings/toolbar.d.ts(10,26): error TS2307: Cannot find module ‘@angular/cdk/platform’. node_modules/@angular/material/tooltip/typings/tooltip.d.ts(9,45): error TS2307: Cannot find module ‘@angular/cdk/a11y’. node_modules/@angular/material/tooltip/typings/tooltip.d.ts(10,32): error TS2307: Cannot find module ‘@angular/cdk/bidi’. node_modules/@angular/material/tooltip/typings/tooltip.d.ts(11,156): error TS2307: Cannot find module ‘@angular/cdk/overlay’. node_modules/@angular/material/tooltip/typings/tooltip.d.ts(12,26): error TS2307: Cannot find module ‘@angular/cdk/platform’. node_modules/@angular/material/tooltip/typings/tooltip.d.ts(13,34): error TS2307: Cannot find module ‘@angular/cdk/scrolling’.

webpack: Failed to compile. `

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:10
  • Comments:29 (5 by maintainers)

github_iconTop GitHub Comments

37reactions
willshowellcommented, Nov 8, 2017

Did you install @angular/cdk?

33reactions
willshowellcommented, Nov 9, 2017

@Flayovec it should be as easy as copy-pasting C:\Users\Erik\WebstormProjects\FellCMS\package.json here.

It should contain a dependencies section that looks approximately like this (there may be more ^ or ~ before the version numbers),

  "dependencies": {
    "@angular/animations": "5.0.0",
    "@angular/common": "5.0.0",
    "@angular/compiler": "5.0.0",
    "@angular/core": "5.0.0",
    "@angular/forms": "5.0.0",
    "@angular/http": "5.0.0",
    "@angular/platform-browser": "5.0.0",
    "@angular/platform-browser-dynamic": "5.0.0",
    "@angular/router": "5.0.0",
    "core-js": "2.5.1",
    "rxjs": "5.5.2",
    "zone.js": "0.8.17",
    "router": "1.3.2",
    "hammerjs": "2.0.8",
    "@angular/cdk": "5.0.0-rc0",
    "@angular/material": "5.0.0-rc0",
    "web-animations-js": "2.3.1"
  },

Further, if you are using git and committing when the project is in a working state, you can edit files with confidence that you’ll be able to later revert your changes. The following commands would likely fix this:

npm install --save @angular/material @angular/cdk
rm -rf node_modules
npm install
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run CDK local Error: Cannot find module 'aws-cdk ...
Trying to run cdklocal (having used npm to install it) and get the following error: node:internal/modules/cjs/loader:927 throw err; ...
Read more >
AWS CDK: Cannot find module 'typescript' - Stack Overflow
I'm leaning towards the node_modules resolutions. This is not running where my tsconfig is as all the other scripts are working properly. I'm ......
Read more >
Troubleshooting common AWS CDK issues
This topic describes how to troubleshoot the following issues with the AWS CDK. The version of the AWS CDK Toolkit (which provides the...
Read more >
awslabs/aws-cdk - Gitter
myfunc/index.ts is my handler, and config/index.ts uses nconf to load settings. CDK deploy runs smoothly, but at runtime I get a cannot find...
Read more >
@aws-cdk/assert - npm
We recommend you use the @aws-cdk/assertions module instead. This library contains helpers for writing unit tests and integration tests for CDK libraries. Unit ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found