JHipster应用程序在生产模式下产生“ @ angular / compiler-cli需要为2.3.1或更高版本”错误

时间:2018-07-16 13:53:04

标签: angular webpack jhipster

我有一个使用Angular 6的JHipster应用程序。此应用程序在开发人员模式下可以正常工作,但在生产模式下会产生“ @ angular / compiler-cli需要为2.3.1或更高版本”错误。

我在其他链接中发现了类似的问题,我试图执行相同的命令但没有成功。

{
  ...
  "cacheDirectories": [
    "node_modules"
  ],
  "dependencies": {
    "@angular/animations": "6.0.6",
    "@angular/common": "6.0.6",
    "@angular/compiler": "6.0.6",
    "@angular/core": "6.0.6",
    "@angular/forms": "6.0.6",
    "@angular/platform-browser": "6.0.6",
    "@angular/platform-browser-dynamic": "6.0.6",
    "@angular/router": "6.0.6",
    "@ng-bootstrap/ng-bootstrap": "1.0.0",
    "bootstrap": "4.1.1",
    "core-js": "2.4.1",
    "font-awesome": "4.7.0",
    "jquery": "3.2.1",
    "ng-jhipster": "0.5.4",
    "ngx-cookie": "2.0.1",
    "ngx-infinite-scroll": "0.5.1",
    "ngx-webstorage": "2.0.1",
    "primeng": "5.2.7",
    "reflect-metadata": "0.1.10",
    "rxjs": "6.2.1",
    "rxjs-compat": "6.2.1",
    "swagger-ui": "2.2.10",
    "tether": "1.4.0",
    "zone.js": "0.8.26",
    "ngx-image-cropper": "0.2.8"
  },
  "devDependencies": {
    "@angular/cli": "^6.0.8",
    "@angular/compiler-cli": "6.0.6",
    "@ngtools/webpack": "^6.0.8",
    "@types/fullcalendar": "3.8.0",
    "@types/jasmine": "2.5.53",
    "@types/node": "8.0.18",
    "@types/quill": "^1.3.3",
    "angular2-template-loader": "0.6.2",
    "awesome-typescript-loader": "3.2.2",
    "browser-sync": "2.18.13",
    "browser-sync-webpack-plugin": "1.2.0",
    "codelyzer": "4.4.2",
    "copy-webpack-plugin": "4.2.3",
    "css-loader": "0.28.4",
    "exports-loader": "0.6.4",
    "extract-text-webpack-plugin": "3.0.2",
    "file-loader": "1.1.5",
    "fullcalendar": "3.9.0",
    "generator-jhipster": "4.14.4",
    "html-loader": "0.5.0",
    "html-webpack-plugin": "2.30.1",
    "jasmine-core": "2.7.0",
    "karma": "1.7.1",
    "karma-chrome-launcher": "2.2.0",
    "karma-coverage": "1.1.1",
    "karma-intl-shim": "1.0.3",
    "karma-jasmine": "1.1.0",
    "karma-junit-reporter": "1.2.0",
    "karma-notify-reporter": "1.0.1",
    "karma-phantomjs-launcher": "1.0.4",
    "karma-remap-istanbul": "0.6.0",
    "karma-sourcemap-loader": "0.3.7",
    "karma-webpack": "2.0.4",
    "merge-jsons-webpack-plugin": "1.0.11",
    "node-sass": "4.5.3",
    "phantomjs-prebuilt": "2.1.16",
    "postcss": "6.0.23",
    "proxy-middleware": "0.15.0",
    "quill": "^1.3.2",
    "rimraf": "2.6.1",
    "sass-loader": "6.0.6",
    "source-map": "0.6.1",
    "sourcemap-istanbul-instrumenter-loader": "0.2.0",
    "style-loader": "0.18.2",
    "to-string-loader": "1.1.5",
    "tslint": "5.5.0",
    "tslint-loader": "3.5.3",
    "typescript": "2.7.2",
    "uglifyjs-webpack-plugin": "1.1.5",
    "web-app-manifest-loader": "0.1.1",
    "webpack": "3.10.0",
    "webpack-dev-server": "2.9.5",
    "webpack-merge": "4.1.1",
    "webpack-notifier": "1.5.1",
    "webpack-visualizer-plugin": "0.1.11",
    "workbox-webpack-plugin": "3.0.0-beta.1",
    "write-file-webpack-plugin": "4.1.0",
    "xml2js": "0.4.17"
  },
  "engines": {
    "node": ">=6.9.0"
  },
  "resolutions": {
    "source-map": "0.6.1"
  },
  ...
}

参考链接:

Update to angular 5 throws Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is 5.1.0:

Angular: Upgrading to version 5 error: Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is “5.0.0”

谢谢。

0 个答案:

没有答案