не удается найти модуль '@ angular / compiler-cli / ng c' при запуске ng serve - PullRequest
0 голосов
/ 06 февраля 2020

мой пакет. json файл

  1. Нумерованные списки просты

    {"name": "cal-eu c", "version": "0.0.0", "scripts": {"ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e"}, "private": true, "dependencies": {"@ angular / animations": "^ 7.0.1", "@ angular / common": "^ 7.0 .1 "," @ angular / compiler ":" ^ 7.0.1 "," @ angular / core ":" ^ 7.0.1 "," @ angular / forms ":" ^ 7.0.1 "," @ angular / http ":" ^ 7.0.1 "," @ angular / platform-browser ":" ^ 7.0.1 "," @ angular / platform-browser-dynamici c ":" ^ 7.0.1 "," @angular / router ":" ^ 7.0.1 "," core- js ":" ^ 2.5.4 "," rx js ":" ^ 6.0.0 "," rx js -compat ":" ^ 6.5.4 "," zone. js ":" ~ 0.8.26 "}," devDependencies ": {" @ angular -devkit / build- angular ":" ^ 0.803.25 "," @ angular / cli ":" ^ 8.3.25 "," @ angular / compiler-cli ":" ^ 7.0.1 "," @ angular / language-service ":" ^ 7.0.1 "," @ types / jasmine ":" ~ 2.8.6 "," @ types / jasminewd2 ":" ~ 2.0.3 "," @ types / node ":" ~ 8.9.4 "," codelyzer ":" ~ 4.2.1 "," jasmine -core ":" ~ 2.99.1 "," jasm ine-spe c -reporter ":" ~ 4.2.1 "," karma ":" ^ 4.4.1 "," karma- chrome-launcher ":" ~ 2.2.0 "," karma-lighting- istanbul-reporter ":" ~ 2.0.0 "," karma-jasmine ":" ~ 1.1.1 "," karma-jasmine- html -reporter ":" ^ 0.2.2 "," транспортир ":" ~ 5.4.0 "," ts-node ":" ~ 5.0.1 "," tslint ":" ~ 5.9.1 "," typcript ":" ~ 3.1.3 "}}

1 Ответ

2 голосов
/ 06 февраля 2020

У меня была такая же проблема. Это связано с тем, что версия angular -cli больше, чем версия angular, а compiler-cli несовместим. Я понизил версию angular -cli до 7, и теперь мой проект работает без проблем.

Я не смог найти другого решения.

npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@7.3.9

С уважением

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...