不运行ng serve找不到模块'@ angular / compiler-cli / ngcc'

时间:2019-06-20 09:32:10

标签: angular charts

每当我要从命令提示符运行ng serve时,都会出现错误,提示找不到模块'@ angular / compiler-cli / ngcc,请帮助我在下面附加json文件!我收到的错误在下面,我的json文件是这个

请检查并帮助我,我是我的新手,虽然我更新了所有内容……

 "name": "mdb-angular-free",
      "version": "7.4.1",
      "license": "MIT",
      "scripts": {
        "ng": "ng",
        "start": "ng serve",
        "build": "ng build",
        "test": "ng test",
        "lint": "ng lint",
        "e2e": "ng e2e",
        "remove-demo-unix": "rm -rf projects && rm angular.json && mv angular-clean.json angular.json",
        "remove-demo-windows": "rmdir /s /q projects && del angular.json && ren angular-clean.json angular.json"
      },
      "private": true,
      "dependencies": {
        "@agm/core": "^1.0.0-beta.6",
        "@angular/animations": "^7.2.15",
        "@angular/common": "^7.2.15",
        "@angular/core": "^7.2.15",
        "@angular/forms": "^7.2.15",
        "@angular/http": "^7.2.15",
        "@angular/platform-browser": "^7.2.15",
        "@angular/platform-browser-dynamic": "^7.2.15",
        "@angular/platform-server": "^7.2.15",
        "@angular/router": "^7.2.15",
        "@fortawesome/fontawesome-free": "^5.9.0",
        "angular-bootstrap-md": "7.4.1",
        "chart.js": "^2.8.0",
        "classlist.js": "^1.1.20150312",
        "core-js": "^2.6.9",
        "font-awesome": "^4.7.0",
        "hammerjs": "^2.0.8",
        "rxjs": "^6.5.2",
        "rxjs-compat": "^6.5.2",
        "web-animations-js": "^2.3.1",
        "zone.js": "^0.8.29"
      },
      "devDependencies": {
        "@angular-devkit/build-angular": "^0.800.3",
        "@angular/cli": "^8.0.3",
        "@angular/compiler": "^7.2.15",
        "@angular/compiler-cli": "^7.2.15",
        "@angular/language-service": "^7.2.15",
        "@types/jasmine": "^3.3.13",
        "@types/jasminewd2": "~2.0.2",
        "@types/node": "^10.12.30",
        "codelyzer": "^4.0.1",
        "jasmine-core": "~3.3.0",
        "jasmine-spec-reporter": "~4.2.1",
        "karma": "^4.1.0",
        "karma-chrome-launcher": "~2.2.0",
        "karma-cli": "~1.0.1",
        "karma-coverage-istanbul-reporter": "^2.0.5",
        "karma-jasmine": "~2.0.1",
        "karma-jasmine-html-reporter": "^1.4.2",
        "protractor": "^5.4.1",
        "ts-node": "~7.0.1",
        "tslint": "~5.11.0",
        "typescript": "~3.1.6"
      }
    }
     
` 

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Utsav\Angular-Tutorial-Agenda-App\agenda-app\start-here>ng serve
Cannot find module '@angular/compiler-cli/ngcc'
Error: Cannot find module '@angular/compiler-cli/ngcc'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (C:\Users\Utsav\Angular-Tutorial-Agenda-App\agenda-app\start-here\node_modules\@ngtools\webpack\src\ngcc_processor.js:10:16)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (C:\Users\Utsav\Angular-Tutorial-Agenda-App\agenda-app\start-here\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:23:26)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (C:\Users\Utsav\Angular-Tutorial-Agenda-App\agenda-app\start-here\node_modules\@ngtools\webpack\src\index.js:13:10)
    at Module._compile (internal/modules/cjs/loader.js:776:30)

C:\Users\Utsav\Angular-Tutorial-Agenda-App\agenda-app\start-here>

0 个答案:

没有答案