javascript - "Cannot find module '@angularcompiler-clingcc'" when running "ng serve&a

I'm trying to run my app and i get this error. I tried some solution I've found on internet,l

I'm trying to run my app and i get this error. I tried some solution I've found on internet,like uninstalling angular/cli,reinstalling it,checking if in my package.json the version was correct,if it was @angular/cli either than @angular-cli in devDependencies and some other stuff,like uninstalling and installing npm,deleting node modules and reinstalling it,but none of the previous solved my problem... this is my package.json

    {
  "name": "techlog-admin",
  "version": "3.2.1",
  "license": "MIT",
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "IE 11"
  ],
  "scripts": {
    "ng": "ng",
    "conventional-changelog": "conventional-changelog",
    "start": "ng serve",
    "build": "ng build",
    "build:prod": "npm run build -- --prod --aot",
    "test": "ng test",
    "test:coverage": "rimraf coverage && npm run test -- --code-coverage",
    "lint": "ng lint",
    "lint:fix": "ng lint techlog-admin-demo --fix",
    "lint:styles": "stylelint ./src/**/*.scss",
    "lint:ci": "npm run lint && npm run lint:styles",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "ng e2e",
    "docs": "podoc -p src/tsconfig.app.json -d docs",
    "docs:serve": "podoc -p src/tsconfig.app.json -d docs -s",
    "prepush": "npm run lint:ci",
    "release:changelog": "npm run conventional-changelog -- -p angular -i CHANGELOG.md -s"
  },
  "dependencies": {
    "@agm/core": "^1.0.0-beta.5",
    "@angular/animations": "^7.2.13",
    "@angular/cdk": "^7.3.7",
    "@angular/mon": "^7.2.11",
    "@angular/piler": "^7.2.11",
    "@angular/core": "^7.2.11",
    "@angular/forms": "^7.2.11",
    "@angular/http": "^7.2.11",
    "@angular/material": "^7.3.7",
    "@angular/platform-browser": "^7.2.11",
    "@angular/platform-browser-dynamic": "^7.2.11",
    "@angular/router": "^7.2.11",
    "@asymmetrik/ngx-leaflet": "3.0.1",
    "@fortawesome/angular-fontawesome": "^0.3.0",
    "@fortawesome/fontawesome-svg-core": "^1.2.17",
    "@fortawesome/free-solid-svg-icons": "^5.8.1",
    "@nebular/auth": "3.4.2",
    "@nebular/bootstrap": "3.4.2",
    "@nebular/moment": "^3.4.0",
    "@nebular/security": "3.4.2",
    "@nebular/theme": "3.4.2",
    "@ng-bootstrap/ng-bootstrap": "^4.0.0",
    "@ng-idle/core": "^6.0.0-beta.5",
    "@ng-idle/keepalive": "^6.0.0-beta.5",
    "@ngx-translate/core": "^11.0.1",
    "@swimlane/ngx-charts": "^10.0.0",
    "angular-tree-ponent": "7.2.0",
    "angular2-chartjs": "0.4.1",
    "angular2-toaster": "^7.0.0",
    "bootstrap": "^4.3.1",
    "chart.js": "^2.8.0",
    "ckeditor": "4.7.3",
    "classlist.js": "1.1.20150312",
    "core-js": "2.5.1",
    "echarts": "^4.0.2",
    "eva-icons": "^1.1.0",
    "intl": "1.2.5",
    "ionicons": "2.0.1",
    "jquery": "^3.4.0",
    "leaflet": "1.2.0",
    "nebular-icons": "1.1.0",
    "ng2-ckeditor": "^1.2.2",
    "ng2-pleter": "2.0.8",
    "ng2-smart-table": "1.3.5",
    "ngx-echarts": "^4.0.1",
    "ngx-show-hide-password": "^2.0.3",
    "ngx-spinner": "^7.1.4",
    "ngx-typeahead": "^6.2.0",
    "normalize.css": "6.0.0",
    "or": "^0.2.0",
    "pace-js": "1.0.2",
    "roboto-fontface": "0.8.0",
    "rxjs": "6.4.0",
    "rxjs-pat": "6.3.0",
    "socicon": "3.0.5",
    "tinymce": "4.5.7",
    "ts-md5": "^1.2.4",
    "tslib": "^1.9.0",
    "typeface-exo": "0.0.22",
    "web-animations-js": "2.2.5",
    "zone.js": "^0.8.29"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.801.3",
    "@angular/cli": "^8.1.3",
    "@angular/piler-cli": "^7.2.15",
    "@angular/language-service": "7.2.11",
    "@podoc/podoc": "^1.1.10",
    "@fortawesome/fontawesome-free": "^5.2.0",
    "@types/d3-color": "1.0.5",
    "@types/googlemaps": "^3.30.4",
    "@types/jasmine": "2.5.54",
    "@types/jasminewd2": "2.0.3",
    "@types/leaflet": "1.2.3",
    "@types/node": "6.0.90",
    "codelyzer": "^4.5.0",
    "conventional-changelog-cli": "1.3.4",
    "husky": "0.13.3",
    "jasmine-core": "2.6.4",
    "jasmine-spec-reporter": "4.1.1",
    "karma": "1.7.1",
    "karma-chrome-launcher": "2.1.1",
    "karma-cli": "1.0.1",
    "karma-coverage-istanbul-reporter": "1.3.0",
    "karma-jasmine": "1.1.0",
    "karma-jasmine-html-reporter": "0.2.2",
    "npm-run-all": "4.0.2",
    "protractor": "5.1.2",
    "rimraf": "2.6.1",
    "stylelint": "7.13.0",
    "ts-node": "3.2.2",
    "tslint": "5.7.0",
    "tslint-language-service": "^0.9.9",
    "typescript": "3.2.4"
  }
}

If you need any more information ask me and I'll post as soon as I can! Thank you

I'm trying to run my app and i get this error. I tried some solution I've found on internet,like uninstalling angular/cli,reinstalling it,checking if in my package.json the version was correct,if it was @angular/cli either than @angular-cli in devDependencies and some other stuff,like uninstalling and installing npm,deleting node modules and reinstalling it,but none of the previous solved my problem... this is my package.json

    {
  "name": "techlog-admin",
  "version": "3.2.1",
  "license": "MIT",
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "IE 11"
  ],
  "scripts": {
    "ng": "ng",
    "conventional-changelog": "conventional-changelog",
    "start": "ng serve",
    "build": "ng build",
    "build:prod": "npm run build -- --prod --aot",
    "test": "ng test",
    "test:coverage": "rimraf coverage && npm run test -- --code-coverage",
    "lint": "ng lint",
    "lint:fix": "ng lint techlog-admin-demo --fix",
    "lint:styles": "stylelint ./src/**/*.scss",
    "lint:ci": "npm run lint && npm run lint:styles",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "ng e2e",
    "docs": "podoc -p src/tsconfig.app.json -d docs",
    "docs:serve": "podoc -p src/tsconfig.app.json -d docs -s",
    "prepush": "npm run lint:ci",
    "release:changelog": "npm run conventional-changelog -- -p angular -i CHANGELOG.md -s"
  },
  "dependencies": {
    "@agm/core": "^1.0.0-beta.5",
    "@angular/animations": "^7.2.13",
    "@angular/cdk": "^7.3.7",
    "@angular/mon": "^7.2.11",
    "@angular/piler": "^7.2.11",
    "@angular/core": "^7.2.11",
    "@angular/forms": "^7.2.11",
    "@angular/http": "^7.2.11",
    "@angular/material": "^7.3.7",
    "@angular/platform-browser": "^7.2.11",
    "@angular/platform-browser-dynamic": "^7.2.11",
    "@angular/router": "^7.2.11",
    "@asymmetrik/ngx-leaflet": "3.0.1",
    "@fortawesome/angular-fontawesome": "^0.3.0",
    "@fortawesome/fontawesome-svg-core": "^1.2.17",
    "@fortawesome/free-solid-svg-icons": "^5.8.1",
    "@nebular/auth": "3.4.2",
    "@nebular/bootstrap": "3.4.2",
    "@nebular/moment": "^3.4.0",
    "@nebular/security": "3.4.2",
    "@nebular/theme": "3.4.2",
    "@ng-bootstrap/ng-bootstrap": "^4.0.0",
    "@ng-idle/core": "^6.0.0-beta.5",
    "@ng-idle/keepalive": "^6.0.0-beta.5",
    "@ngx-translate/core": "^11.0.1",
    "@swimlane/ngx-charts": "^10.0.0",
    "angular-tree-ponent": "7.2.0",
    "angular2-chartjs": "0.4.1",
    "angular2-toaster": "^7.0.0",
    "bootstrap": "^4.3.1",
    "chart.js": "^2.8.0",
    "ckeditor": "4.7.3",
    "classlist.js": "1.1.20150312",
    "core-js": "2.5.1",
    "echarts": "^4.0.2",
    "eva-icons": "^1.1.0",
    "intl": "1.2.5",
    "ionicons": "2.0.1",
    "jquery": "^3.4.0",
    "leaflet": "1.2.0",
    "nebular-icons": "1.1.0",
    "ng2-ckeditor": "^1.2.2",
    "ng2-pleter": "2.0.8",
    "ng2-smart-table": "1.3.5",
    "ngx-echarts": "^4.0.1",
    "ngx-show-hide-password": "^2.0.3",
    "ngx-spinner": "^7.1.4",
    "ngx-typeahead": "^6.2.0",
    "normalize.css": "6.0.0",
    "or": "^0.2.0",
    "pace-js": "1.0.2",
    "roboto-fontface": "0.8.0",
    "rxjs": "6.4.0",
    "rxjs-pat": "6.3.0",
    "socicon": "3.0.5",
    "tinymce": "4.5.7",
    "ts-md5": "^1.2.4",
    "tslib": "^1.9.0",
    "typeface-exo": "0.0.22",
    "web-animations-js": "2.2.5",
    "zone.js": "^0.8.29"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.801.3",
    "@angular/cli": "^8.1.3",
    "@angular/piler-cli": "^7.2.15",
    "@angular/language-service": "7.2.11",
    "@podoc/podoc": "^1.1.10",
    "@fortawesome/fontawesome-free": "^5.2.0",
    "@types/d3-color": "1.0.5",
    "@types/googlemaps": "^3.30.4",
    "@types/jasmine": "2.5.54",
    "@types/jasminewd2": "2.0.3",
    "@types/leaflet": "1.2.3",
    "@types/node": "6.0.90",
    "codelyzer": "^4.5.0",
    "conventional-changelog-cli": "1.3.4",
    "husky": "0.13.3",
    "jasmine-core": "2.6.4",
    "jasmine-spec-reporter": "4.1.1",
    "karma": "1.7.1",
    "karma-chrome-launcher": "2.1.1",
    "karma-cli": "1.0.1",
    "karma-coverage-istanbul-reporter": "1.3.0",
    "karma-jasmine": "1.1.0",
    "karma-jasmine-html-reporter": "0.2.2",
    "npm-run-all": "4.0.2",
    "protractor": "5.1.2",
    "rimraf": "2.6.1",
    "stylelint": "7.13.0",
    "ts-node": "3.2.2",
    "tslint": "5.7.0",
    "tslint-language-service": "^0.9.9",
    "typescript": "3.2.4"
  }
}

If you need any more information ask me and I'll post as soon as I can! Thank you

Share Improve this question edited Oct 22, 2019 at 4:00 Tony 20.2k7 gold badges41 silver badges62 bronze badges asked Jul 30, 2019 at 15:03 FergantFergant 811 gold badge1 silver badge9 bronze badges 1
  • 2 Keep it in sync with project's @angular/cli version – nircraft Commented Jul 30, 2019 at 15:10
Add a ment  | 

3 Answers 3

Reset to default 2

Few thing to try with this error

You can use these mand to see if it work.

npm uninstall angular-cli -g
npm uninstall angular-cli --save
npm install -g @angular/cli
npm install @angular/cli --save
npm install @angular/piler-cli --save

I've tried all the things I've found in other Stackoverflow and github threads, but the only things that worked for me was to downgraded the angular@cli to 7.2 (which is the current angular packages version in my project) and also install manually the following packages:

npm install @angular/piler-cli --save

npm install @angular-devkit/build-angular

My package.json contains both of these dependencies, however it seemed that npm install couldn't install them. So I had to do it manually.

For what I understand, this is an issue between newer and older versions of the angular/cli.

Hope I could help!

I had the same issue a few months back. I tried the following steps and I was able to pile the code without any more issues:

  • You could create an empty angular project and pare their package.json and manually edit the angular dependencies.
  • Delete node_modules and package-lock.json
  • Run npm i --save

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744217912a4563640.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信