Travis版本不兼容,版本不兼容

时间:2018-05-10 10:32:37

标签: angular travis-ci

我有应用程序,在本地工作正常,但在TravisCI上构建失败。 我做了一些研究,但我不知道,我应该使用哪个版本的依赖项。不幸的是我在package.json中键入了“latest”。

:rekolekcje-webapp:npmInstallnpm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained
npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated buildmail@4.0.1: This project is unmaintained
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN notice [SECURITY] timespan has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=timespan&version=2.3.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] tunnel-agent has 1 moderate vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=tunnel-agent&version=0.4.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] https-proxy-agent has 1 high vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=https-proxy-agent&version=1.0.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] http-proxy-agent has 1 high vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=http-proxy-agent&version=1.0.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] debug has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.2.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] debug has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=0.7.4 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] hoek has 1 moderate vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=hoek&version=2.16.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
> uws@9.14.0 install /home/travis/build/oaza-waw/rekolekcje-api/rekolekcje-webapp/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0
> node-sass@4.9.0 install /home/travis/build/oaza-waw/rekolekcje-api/rekolekcje-webapp/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/linux-x64-59_binding.node
Download complete
Binary saved to /home/travis/build/oaza-waw/rekolekcje-api/rekolekcje-webapp/node_modules/node-sass/vendor/linux-x64-59/binding.node
Caching binary to /home/travis/.npm/node-sass/4.9.0/linux-x64-59_binding.node
> phantomjs-prebuilt@2.1.16 install /home/travis/build/oaza-waw/rekolekcje-api/rekolekcje-webapp/node_modules/phantomjs-prebuilt
> node install.js
Considering PhantomJS found at /usr/local/phantomjs/bin/phantomjs
Found PhantomJS at /usr/local/phantomjs/bin/phantomjs ...verifying
Writing location.js file
PhantomJS is already installed on PATH at /usr/local/phantomjs/bin/phantomjs
> uglifyjs-webpack-plugin@0.4.6 postinstall /home/travis/build/oaza-waw/rekolekcje-api/rekolekcje-webapp/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
> node-sass@4.9.0 postinstall /home/travis/build/oaza-waw/rekolekcje-api/rekolekcje-webapp/node_modules/node-sass
> node scripts/build.js
Binary found at /home/travis/build/oaza-waw/rekolekcje-api/rekolekcje-webapp/node_modules/node-sass/vendor/linux-x64-59/binding.node
Testing binary
Binary is fine
npm WARN @angular/cdk@6.0.1 requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/common@5.2.10 requires a peer of @angular/core@5.2.10 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/core@6.0.0 requires a peer of rxjs@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/forms@6.0.0 requires a peer of rxjs@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/forms@6.0.0 requires a peer of @angular/common@6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/http@6.0.0 requires a peer of rxjs@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/material@5.2.5 requires a peer of @angular/cdk@5.2.5 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/platform-browser@6.0.0 requires a peer of @angular/common@6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/platform-browser-dynamic@6.0.0 requires a peer of @angular/common@6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/router@6.0.0 requires a peer of @angular/common@6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/router@6.0.0 requires a peer of rxjs@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngrx/effects@4.1.1 requires a peer of @angular/core@^4.0.0 || ^5.0.0-rc.2 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngrx/store@4.1.1 requires a peer of @angular/core@^4.0.0 || ^5.0.0-rc.2 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.1.1 requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.
npm WARN ng-jhipster@0.5.3 requires a peer of @angular/core@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-jhipster@0.5.3 requires a peer of @angular/router@^5.0.0 but none is installed. You must install peer dependencies yourself.
added 1307 packages in 63.228s
npm WARN @angular/compiler-cli@6.0.0 requires a peer of typescript@>=2.7.2 <2.8 but none is installed. You must install peer dependencies yourself.
npm WARN karma-jasmine-html-reporter@1.0.0 requires a peer of jasmine@^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsickle@0.27.5 requires a peer of typescript@>=2.4.2 <2.8 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
:rekolekcje-webapp:buildClient
> rekolekcje-webapp@0.0.1 build /home/travis/build/oaza-waw/rekolekcje-api/rekolekcje-webapp
> ng build --prod
Date: 2018-05-09T21:14:38.404Z
Hash: b47c21f4d63c6f0f2f9e
Time: 8732ms
ERROR in The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but 2.8.3 was found instead.
chunk {scripts} scripts.385b291e179030219400.bundle.js (scripts) 137 kB [initial] [rendered]
chunk {0} styles.3a610078080c8e57d977.bundle.css (styles) 241 kB [initial] [rendered]
chunk {1} polyfills.997d8cc03812de50ae67.bundle.js (polyfills) 84 bytes [initial] [rendered]
chunk {2} main.ee32620ecd1edff94184.bundle.js (main) 84 bytes [initial] [rendered]
chunk {3} inline.318b50c57b4eba3d437b.bundle.js (inline) 796 bytes [entry] [rendered]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rekolekcje-webapp@0.0.1 build: `ng build --prod`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the rekolekcje-webapp@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-05-09T21_14_38_446Z-debug.log
:rekolekcje-webapp:buildClient FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':rekolekcje-webapp:buildClient'.
> Process 'command '/home/travis/build/oaza-waw/rekolekcje-api/rekolekcje-webapp/node/node-v9.4.0-linux-x64/bin/node'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 50s
5 actionable tasks: 5 executed

如您所见,有很多npm警告。 还有我的package.json:

{
  "name": "------",
  "version": "0.0.1",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve --proxy-config proxy.conf.json",
    "build": "ng build --prod",
    "buildDev": "ng build",
    "buildWatch": "ng build --watch=true",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "latest",
    "@angular/cdk": "latest",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "latest",
    "@angular/core": "latest",
    "@angular/forms": "latest",
    "@angular/http": "latest",
    "@angular/material": "^5.0.4",
    "@angular/material-moment-adapter": "^5.2.4",
    "@angular/platform-browser": "latest",
    "@angular/platform-browser-dynamic": "latest",
    "@angular/router": "latest",
    "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^4.1.1",
    "@ngrx/store": "^4.1.1",
    "bootstrap": "latest",
    "core-js": "^2.5.3",
    "font-awesome": "latest",
    "intl": "latest",
    "jquery": "latest",
    "moment": "^2.21.0",
    "ng-jhipster": "latest",
    "ngx-bootstrap": "latest",
    "npm": "^5.6.0",
    "redux": "^3.7.2",
    "rxjs": "^5.5.6",
    "w3-css": "latest",
    "web-animations-js": "^2.3.1",
    "zone.js": "latest"
  },
  "devDependencies": {
    "@angular/cli": "1.7.4",
    "@angular/compiler-cli": "latest",
    "@angular/language-service": "latest",
    "@types/jasmine": "latest",
    "@types/jasminewd2": "latest",
    "@types/jquery": "latest",
    "@types/node": "latest",
    "codelyzer": "latest",
    "jasmine-core": "latest",
    "jasmine-spec-reporter": "latest",
    "karma": "latest",
    "karma-chrome-launcher": "latest",
    "karma-cli": "latest",
    "karma-coverage": "latest",
    "karma-coverage-istanbul-reporter": "latest",
    "karma-jasmine": "latest",
    "karma-jasmine-html-reporter": "latest",
    "karma-phantomjs-launcher": "latest",
    "karma-typescript": "latest",
    "phantomjs-prebuilt": "latest",
    "protractor": "latest",
    "redux-devtools-extension": "^2.13.2",
    "ts-node": "latest",
    "tslint": "latest",
    "typescript": "^2.4.3"
  }
}

我应该如何知道应该使用哪个版本? 任何提示?

由于

1 个答案:

答案 0 :(得分:0)

答案是将依赖项的版本设置为与Angular 5兼容。 我有:

  "dependencies": {
    "@angular/animations": "^5.2.0",
    "@angular/cdk": "^5.2.0",
    "@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.0",
    "@angular/material-moment-adapter": "^5.2.0",
    "@angular/platform-browser": "^5.2.0",
    "@angular/platform-browser-dynamic": "^5.2.0",
    "@angular/router": "^5.2.0",
    "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^4.1.1",
    "@ngrx/store": "^4.1.1",
    "bootstrap": "4.1.1",
    "core-js": "^2.4.1",
    "font-awesome": "latest",
    "intl": "latest",
    "jquery": "latest",
    "moment": "^2.21.0",
    "ng-jhipster": "latest",
    "ngx-bootstrap": "latest",
    "npm": "^5.6.0",
    "popper.js": "^1.14.3",
    "redux": "^3.7.2",
    "rxjs": "^5.5.6",
    "w3-css": "latest",
    "web-animations-js": "^2.3.1",
    "zone.js": "^0.8.19"
  }