简体   繁体   English

Travis CI未使用正确的node.js版本

[英]Travis CI not using correct node.js version

I'm writing ES6 code, using class and const , but Travis CI is saying that my build is failing because it is running my test script with node.js version 0.10.48 . 我正在编写ES6代码,使用classconst ,但是Travis CI说我的构建失败了,因为它运行的是我的测试脚本node.js版本0.10.48 Here is a link to the failed build: https://travis-ci.org/javacoolme/google-sign-in/builds/205586193 . 以下是失败版本的链接: https//travis-ci.org/javacoolme/google-sign-in/builds/205586193

You should specify the node versions you want to test in your .travis.yml file like this: 您应该在.travis.yml文件中指定要测试的节点版本,如下所示:

language: node_js
node_js:
  - "6"
  - "4"

Make sure you have the correct indentation... Only 2 spaces before - "6" 确保你有正确的缩进...之前只有2个空格- "6"

您可以按此处所述指定节点版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 Travis-CI 用于 Node.js 项目 - Using Travis-CI for Node.js project 如何在 Travis CI 的 PHP 容器上安装特定的 node.js 版本? - How can I install a specific node.js version on a PHP container on Travis CI? 测试在Travis CI上使用Node.js(Express)构建的REST API - Testing REST api built using Node.js(Express) on Travis CI Travis-CI:所有VM映像上安装的Node版本是否可以匹配node.js映像上的最新版本(稳定版)? - Travis-CI: Can the version of Node installed on all VM images match the latest (stable) on the node.js images? 如何配置 Travis CI 以在没有测试的情况下构建 Node.js? - How to configure Travis CI to build Node.js without tests? 通过 Travis CI API 传递 Node.JS 运行参数 - Passing Node.JS run params via Travis CI API 本地主机(Node.js服务器)的请求在travis ci中返回ECONNREFUSED - request to localhost (Node.js server) returns ECONNREFUSED in travis ci 如何使用travis-ci的.travis.yml为Node.js应用程序提供环境参数? - How to use travis-ci's .travis.yml to provide environment parameters for Node.js Application? 如何在使用Nightwatch测试Node.js项目时在Travis CI上运行Selenium Server - How to run Selenium Server on Travis CI when testing a Node.js project with Nightwatch 带Node.js和Postgresql的Travis CI:不存在错误关系 - Travis CI w/ Node.js and Postgresql: Error Relation Does Not Exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM