Я просто переместил свой угловой 4 в угловой 5, и теперь он больше не строит - PullRequest
0 голосов
/ 14 ноября 2018

После обновления моего Angular 4 до Angular 5 он больше не собирается, и решения вокруг не работают. Я использую пряжу для сборки.

package.json

  "dependencies": {
    "@angular/animations": "5.2.0",
    "@angular/cdk": "5.2.4",
    "@angular/common": "5.2.0",
    "@angular/compiler": "5.2.0",
    "@angular/core": "5.2.0",
    "@angular/forms": "5.2.0",
    "@angular/http": "5.2.0",
    "@angular/material": "5.2.4",
    "@angular/material-moment-adapter": "5.2.4",
    "@angular/platform-browser": "5.2.0",
    "@angular/platform-browser-dynamic": "5.2.0",
    "@angular/platform-server": "5.2.0",
    "@angular/router": "5.2.0",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.9",
    "@ngx-translate/core": "8.0.0",
    "@ngx-translate/http-loader": "2.0.1",
    "bootstrap": "4.0.0",
    "core-js": "2.4.1",
    "currency-codes": "^1.2.0",
    "echarts": "^4.1.0",
    "font-awesome": "4.7.0",
    "jquery": "3.2.1",
    "jquery-slimscroll": "^1.3.8",
    "moment": "^2.22.2",
    "moment-timezone": "^0.5.14",
    "ng-jhipster": "0.4.0",
    "ngx-cookie": "2.0.1",
    "ngx-infinite-scroll": "0.5.1",
    "ngx-webstorage": "^2.0.1",
    "primeng": "4.3.0",
    "reflect-metadata": "0.1.10",
    "rxjs": "5.5.2",
    "swagger-ui": "2.2.10",
    "sweetalert": "^2.1.0",
    "tether": "1.4.0",
    "zone.js": "0.8.16"
  },
  "devDependencies": {
    "@angular/cli": "1.2.6",
    "@angular/compiler-cli": "5.2.0",
    "@types/echarts": "^4.1.1",
    "@types/jasmine": "2.5.53",
    "@types/node": "8.0.18",
    "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": "3.1.2",
    "copy-webpack-plugin": "4.0.1",
    "css-loader": "0.28.4",
    "exports-loader": "0.6.4",
    "extract-text-webpack-plugin": "3.0.0",
    "file-loader": "0.11.2",
    "generator-jhipster": "4.8.2",
    "html-loader": "0.5.0",
    "html-webpack-plugin": "2.30.1",
    "jasmine-core": "2.7.0",
    "karma": "1.7.0",
    "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",
    "ngc-webpack": "3.1.1",
    "node-sass": "4.5.3",
    "phantomjs-prebuilt": "2.1.14",
    "postcss-loader": "2.0.6",
    "proxy-middleware": "0.15.0",
    "rimraf": "2.6.1",
    "sass-loader": "6.0.6",
    "sourcemap-istanbul-instrumenter-loader": "0.2.0",
    "string-replace-webpack-plugin": "0.1.3",
    "style-loader": "0.18.2",
    "to-string-loader": "1.1.5",
    "tslint": "5.5.0",
    "tslint-loader": "3.5.3",
    "typescript": "2.4.2",
    "uglifyjs-webpack-plugin": "1.0.0-beta.2",
    "web-app-manifest-loader": "0.1.1",
    "webpack": "3.5.6",
    "webpack-dev-server": "2.8.1",
    "webpack-merge": "4.1.0",
    "webpack-notifier": "1.5.0",
    "webpack-visualizer-plugin": "0.1.11",
    "write-file-webpack-plugin": "4.1.0"
  },
  "engines": {
    "node": ">=6.9.0"
  }

После успешного выполнения установка пряжи появляется следующая ошибка при запуске сборка пряжи :

warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --config webpack/webpack.prod.js --progress --profile
/Users/user/Documents/dev/project/node_modules/ngc-webpack/src/webpack-chain-module-resolution-host-adapter.js:7
        extendStatics(d, b);
        ^

TypeError: Object prototype may only be an Object or null: undefined
    at setPrototypeOf (<anonymous>)
    at __extends (/Users/tharso/Documents/dev_boracay/gerrit/qr-code-gateway-web/node_modules/ngc-webpack/src/webpack-chain-module-resolution-host-adapter.js:7:9)
    at /Users/tharso/Documents/dev_boracay/gerrit/qr-code-gateway-web/node_modules/ngc-webpack/src/webpack-chain-module-resolution-host-adapter.js:16:5
    at Object.<anonymous> (/Users/tharso/Documents/dev_boracay/gerrit/qr-code-gateway-web/node_modules/ngc-webpack/src/webpack-chain-module-resolution-host-adapter.js:49:2)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
error Command failed with exit code 1.
Process finished with exit code 1

Любое предложение о том, как я могу решить эту проблему?

Любая помощь приветствуется.

Спасибо.

...