web-dev-qa-db-fra.com

erreur TS2307: impossible de trouver le module '@ angular/core'

Donc, je reçois le message d'erreur suivant lorsque j'ai essayé à nouveau de construire mon application:

ERROR in ../../../node_modules/@angular/cdk/a11y/typings/aria-describer/aria-describer.d.ts(8,42): error TS2307: Cannot find module '@angular/core

Cette erreur est survenue pendant que je développais mon application angulaire. Apparemment, je l'ai eu pendant que je programmais, mais je ne l'ai pas remarqué parce que l'application continuait simplement à compiler chaque fois que je faisais des changements. Cette erreur a seulement commencé à m'empêcher de construire l'application ce matin. Est-ce que quelqu'un sait ce qui se passe ici?

erreur complète:

ERROR in ../../../node_modules/@angular/cdk/a11y/typings/aria-describer/aria-describer.d.ts(8,42): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/a11y/typings/focus-monitor/focus-monitor.d.ts(9,82): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/a11y/typings/focus-monitor/focus-monitor.d.ts(10,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/cdk/a11y/typings/focus-trap/focus-trap.d.ts(8,65): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/a11y/typings/key-manager/list-key-manager.d.ts(8,27): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/a11y/typings/key-manager/list-key-manager.d.ts(9,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/cdk/a11y/typings/live-announcer/live-announcer.d.ts(8,53): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/accordion/typings/accordion-item.d.ts(8,60): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/bidi/typings/dir.d.ts(8,59): error TS2307: Cannot find module '@angular/core'.




../../../node_modules/@angular/cdk/bidi/typings/directionality.d.ts(8,46): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/collections/typings/collection-viewer.d.ts(8,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/cdk/collections/typings/data-source.d.ts(8,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/cdk/collections/typings/selection.d.ts(8,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/cdk/collections/typings/unique-selection-dispatcher.d.ts(8,37): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/layout/typings/breakpoints-observer.d.ts(8,35): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/layout/typings/breakpoints-observer.d.ts(10,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/cdk/overlay/typings/keyboard/overlay-keyboard-dispatcher.d.ts(8,53): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/overlay/typings/overlay-container.d.ts(8,53): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/overlay/typings/overlay-directives.d.ts(9,126): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/overlay/typings/overlay-module.d.ts(1,26): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/overlay/typings/overlay-ref.d.ts(10,55): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/overlay/typings/overlay-ref.d.ts(11,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/cdk/overlay/typings/overlay-ref.d.ts(12,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/cdk/overlay/typings/overlay.d.ts(8,76): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/overlay/typings/position/connected-position-strategy.d.ts(9,28): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/overlay/typings/position/connected-position-strategy.d.ts(12,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/cdk/overlay/typings/position/overlay-position-builder.d.ts(8,28): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/overlay/typings/scroll/close-scroll-strategy.d.ts(8,24): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/overlay/typings/scroll/reposition-scroll-strategy.d.ts(8,24): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/overlay/typings/scroll/scroll-strategy-options.d.ts(8,24): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/portal/typings/dom-portal-outlet.d.ts(8,99): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/portal/typings/portal-directives.d.ts(8,137): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/portal/typings/portal-injector.d.ts(8,26): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/portal/typings/portal.d.ts(8,100): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/scrolling/typings/scroll-dispatcher.d.ts(8,57): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/scrolling/typings/scroll-dispatcher.d.ts(10,30): error TS2307: Cannot find module 'rxjs/Subscription'.
../../../node_modules/@angular/cdk/scrolling/typings/scroll-dispatcher.d.ts(11,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/cdk/scrolling/typings/scrollable.d.ts(8,55): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/scrolling/typings/scrollable.d.ts(9,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/cdk/scrolling/typings/viewport-ruler.d.ts(8,45): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/scrolling/typings/viewport-ruler.d.ts(10,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/cdk/stepper/typings/step-label.d.ts(8,29): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/stepper/typings/stepper.d.ts(8,107): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/stepper/typings/stepper.d.ts(10,33): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/cdk/stepper/typings/stepper.d.ts(12,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/cdk/table/typings/cell.d.ts(8,41): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/table/typings/row.d.ts(8,112): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/table/typings/table.d.ts(8,139): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/cdk/table/typings/table.d.ts(11,33): error TS2307: Cannot find module 'rxjs/BehaviorSubject'.
../../../node_modules/@angular/cdk/table/typings/table.d.ts(13,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/autocomplete/typings/autocomplete-trigger.d.ts(10,100): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/autocomplete/typings/autocomplete-trigger.d.ts(11,38): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/autocomplete/typings/autocomplete-trigger.d.ts(14,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/autocomplete/typings/autocomplete.d.ts(8,119): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/button-toggle/typings/button-toggle.d.ts(10,91): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/button-toggle/typings/button-toggle.d.ts(11,38): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/button/typings/button.d.ts(10,39): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/checkbox/typings/checkbox-config.d.ts(8,32): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/checkbox/typings/checkbox-required-validator.d.ts(8,26): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/checkbox/typings/checkbox-required-validator.d.ts(9,43): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/checkbox/typings/checkbox.d.ts(9,87): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/checkbox/typings/checkbox.d.ts(10,38): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/chips/typings/chip-input.d.ts(1,42): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/chips/typings/chip-list.d.ts(11,118): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/chips/typings/chip-list.d.ts(12,77): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/chips/typings/chip-list.d.ts(15,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/chips/typings/chip.d.ts(9,53): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/chips/typings/chip.d.ts(11,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/core/typings/common-behaviors/color.d.ts(9,28): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/core/typings/common-behaviors/common-module.d.ts(8,32): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/core/typings/common-behaviors/error-state.d.ts(10,55): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/core/typings/common-behaviors/error-state.d.ts(11,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/core/typings/common-behaviors/initialized.d.ts(9,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/core/typings/datetime/date-adapter.d.ts(8,32): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/core/typings/datetime/date-adapter.d.ts(9,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/core/typings/datetime/date-adapter.d.ts(10,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/core/typings/datetime/date-formats.d.ts(8,32): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/core/typings/error/error-options.d.ts(1,57): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/core/typings/gestures/gesture-config.d.ts(8,32): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/core/typings/gestures/gesture-config.d.ts(9,37): error TS2307: Cannot find module '@angular/platform-browser'.
../../../node_modules/@angular/material/core/typings/label/label-options.d.ts(8,32): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/core/typings/line/line.d.ts(8,39): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/core/typings/option/option.d.ts(1,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/core/typings/option/option.d.ts(2,106): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/core/typings/ripple/ripple-renderer.d.ts(8,36): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/core/typings/ripple/ripple.d.ts(9,71): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/datepicker/typings/calendar-body.d.ts(8,30): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/datepicker/typings/calendar.d.ts(1,124): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/datepicker/typings/datepicker-input.d.ts(1,71): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/datepicker/typings/datepicker-input.d.ts(2,84): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/datepicker/typings/datepicker-intl.d.ts(1,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/datepicker/typings/datepicker-toggle.d.ts(1,90): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/datepicker/typings/datepicker.d.ts(10,101): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/datepicker/typings/datepicker.d.ts(13,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/datepicker/typings/month-view.d.ts(8,67): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/datepicker/typings/multi-year-view.d.ts(8,67): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/datepicker/typings/year-view.d.ts(8,67): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/dialog/typings/dialog-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/dialog/typings/dialog-config.d.ts(8,34): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/dialog/typings/dialog-container.d.ts(8,92): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/dialog/typings/dialog-container.d.ts(9,32): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/dialog/typings/dialog-content-directives.d.ts(8,62): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/dialog/typings/dialog-ref.d.ts(9,26): error TS2307: Cannot find module '@angular/common'.
../../../node_modules/@angular/material/dialog/typings/dialog-ref.d.ts(11,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/dialog/typings/dialog.d.ts(3,26): error TS2307: Cannot find module '@angular/common'.
../../../node_modules/@angular/material/dialog/typings/dialog.d.ts(4,55): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/dialog/typings/dialog.d.ts(5,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/dialog/typings/dialog.d.ts(6,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/expansion/typings/expansion-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/expansion/typings/expansion-panel-content.d.ts(8,29): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/expansion/typings/expansion-panel-header.d.ts(9,58): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/expansion/typings/expansion-panel.d.ts(8,32): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/expansion/typings/expansion-panel.d.ts(9,108): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/expansion/typings/expansion-panel.d.ts(13,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/form-field/typings/form-field-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/form-field/typings/form-field-control.d.ts(8,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/form-field/typings/form-field-control.d.ts(9,27): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/form-field/typings/form-field.d.ts(1,112): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/grid-list/typings/grid-list.d.ts(8,68): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/grid-list/typings/grid-tile.d.ts(8,57): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/icon/typings/icon-registry.d.ts(1,26): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/icon/typings/icon-registry.d.ts(2,28): error TS2307: Cannot find module '@angular/common/http'.
../../../node_modules/@angular/material/icon/typings/icon-registry.d.ts(3,47): error TS2307: Cannot find module '@angular/platform-browser'.
../../../node_modules/@angular/material/icon/typings/icon-registry.d.ts(4,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/icon/typings/icon.d.ts(1,62): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/input/typings/autosize.d.ts(8,71): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/input/typings/input-value-accessor.d.ts(8,32): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/input/typings/input.d.ts(2,59): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/input/typings/input.d.ts(3,55): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/input/typings/input.d.ts(6,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/list/typings/list.d.ts(8,57): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/list/typings/selection-list.d.ts(10,109): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/list/typings/selection-list.d.ts(12,38): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/menu/typings/menu-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/menu/typings/menu-content.d.ts(8,110): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/menu/typings/menu-directive.d.ts(8,32): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/menu/typings/menu-directive.d.ts(10,119): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/menu/typings/menu-directive.d.ts(11,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/menu/typings/menu-item.d.ts(9,39): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/menu/typings/menu-item.d.ts(11,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/menu/typings/menu-panel.d.ts(8,43): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/menu/typings/menu-trigger.d.ts(3,105): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/paginator/typings/paginator-intl.d.ts(8,26): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/paginator/typings/paginator-intl.d.ts(9,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/paginator/typings/paginator.d.ts(1,68): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/progress-bar/typings/progress-bar.d.ts(8,28): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/progress-spinner/typings/progress-spinner.d.ts(8,54): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/radio/typings/radio.d.ts(10,124): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/radio/typings/radio.d.ts(11,38): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/select/typings/select-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/select/typings/select.d.ts(12,168): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/select/typings/select.d.ts(13,77): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/select/typings/select.d.ts(16,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/sidenav/typings/drawer-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/sidenav/typings/drawer.d.ts(8,32): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/sidenav/typings/drawer.d.ts(12,146): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/sidenav/typings/drawer.d.ts(13,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/sidenav/typings/drawer.d.ts(14,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/sidenav/typings/sidenav.d.ts(8,46): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/slide-toggle/typings/slide-toggle.d.ts(10,90): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/slide-toggle/typings/slide-toggle.d.ts(11,38): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/slider/typings/slider.d.ts(10,80): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/slider/typings/slider.d.ts(11,38): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/snack-bar/typings/snack-bar-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/snack-bar/typings/snack-bar-config.d.ts(8,50): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/snack-bar/typings/snack-bar-container.d.ts(8,97): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/snack-bar/typings/snack-bar-container.d.ts(9,32): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/snack-bar/typings/snack-bar-container.d.ts(11,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/snack-bar/typings/snack-bar-container.d.ts(12,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/snack-bar/typings/snack-bar-ref.d.ts(9,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/snack-bar/typings/snack-bar.d.ts(12,26): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/sort/typings/sort-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/sort/typings/sort-header-intl.d.ts(8,26): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/sort/typings/sort-header-intl.d.ts(9,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/sort/typings/sort-header.d.ts(8,35): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/sort/typings/sort.d.ts(8,52): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/sort/typings/sort.d.ts(11,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/stepper/typings/step-header.d.ts(9,71): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/stepper/typings/step-label.d.ts(8,29): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/stepper/typings/stepper-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/stepper/typings/stepper-icon.d.ts(8,29): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/stepper/typings/stepper-intl.d.ts(1,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/stepper/typings/stepper.d.ts(10,89): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/stepper/typings/stepper.d.ts(11,57): error TS2307: Cannot find module '@angular/forms'.
../../../node_modules/@angular/material/table/typings/cell.d.ts(8,28): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/table/typings/table-data-source.d.ts(9,33): error TS2307: Cannot find module 'rxjs/BehaviorSubject'.
../../../node_modules/@angular/material/table/typings/table-data-source.d.ts(12,30): error TS2307: Cannot find module 'rxjs/Subscription'.
../../../node_modules/@angular/material/tabs/typings/ink-bar.d.ts(8,36): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/tabs/typings/tab-body.d.ts(8,105): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/tabs/typings/tab-body.d.ts(9,32): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/tabs/typings/tab-group.d.ts(8,122): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/tabs/typings/tab-header.d.ts(9,122): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/tabs/typings/tab-label-wrapper.d.ts(8,28): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/tabs/typings/tab-label.d.ts(8,47): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts(11,95): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/tabs/typings/tab.d.ts(9,92): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/tabs/typings/tab.d.ts(11,25): error TS2307: Cannot find module 'rxjs/Subject'.
../../../node_modules/@angular/material/tabs/typings/tabs-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/toolbar/typings/toolbar.d.ts(8,54): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/tooltip/typings/tooltip-animations.d.ts(8,42): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/tooltip/typings/tooltip.d.ts(8,32): error TS2307: Cannot find module '@angular/animations'.
../../../node_modules/@angular/material/tooltip/typings/tooltip.d.ts(14,100): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/material/tooltip/typings/tooltip.d.ts(15,28): error TS2307: Cannot find module 'rxjs/Observable'.
../../../node_modules/@angular/material/typings/version.d.ts(8,25): error TS2307: Cannot find module '@angular/core'.

Je suis désemparé à ce stade. Quelqu'un peut-il m'aider s'il vous plaît?

package.json: https://Pastebin.com/GzfVg1cs

3
B. Hulshof

Ce problème était apparemment causé par le CDK et des modules matériels angulaires. Je ne sais pas exactement comment ça s'est passé mais je l'ai réparé.

Je l'ai corrigé en suivant une réponse dans ce numéro de github: https://github.com/angular/material2/issues/8306

Solution

Pour résoudre ce problème, vous devez exécuter les commandes suivantes:

npm install --save @angular/material @angular/cdk
rm -rf node_modules
npm install
7
B. Hulshof

Je vois que certaines solutions sont radicales, je ne voudrais pas essayer cela en premier lieu. Ma solution n’était pas radicale et c’était efficace.

J'ai eu le problème aussi, j'ai fait un simple npm update C'est ce qui est sorti:

$> npm update
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","Arch":"any"} (current: {"os":"linux","Arch":"x64"})

+ [email protected]
+ [email protected]
added 2 packages from 6 contributors and audited 38996 packages in 13.315s
found 0 vulnerabilities

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","Arch":"any"} (current: {"os":"linux","Arch":"x64"})

+ @types/[email protected]
updated 1 package and audited 38996 packages in 12.972s
found 0 vulnerabilities

Et cela a résolu le problème.

0
Bert Verhees

Pour résoudre ce problème vous devez mettre à jour la version angular cli, car @angular cdk 6.0 nécessite la version @angular core 6.0 (version mise à jour).

essayez d'utiliser la version mise à jour à la fois pour cli et material/cdk

Suivez ces étapes:-

npm désinstaller -g @ angular/cli

npm cache verify (si la version de npm est <5, utilisez npm cache clean)

npm install -g @ angular/cli @ last

créez ensuite un nouveau projet angluar/cli après avoir installé @ angular/material et @ angular/cdk.

j'espère que cela résoudra votre problème.

0
DEEPAK DWIVEDI