无法使用Travis-ci构建和部署node.js项目 - 找不到Rakefile

Mic*_*ael 5 heroku node.js travis-ci heroku-toolbelt

我正在尝试node.js在travis-ci中建立一个项目.这是我的.travis.yml档案:

language: node_js
node_js:
  - 0.8

after_script:
  # Install the Heroku package (or the Heroku toolbelt)
  - npm install heroku
  # Add your Heroku git repo:
  - git remote add heroku git@heroku.com:*****.git
  # Add your Heroku API key:
  - export HEROKU_API_KEY=KEYHERE
  # Turn off warnings about SSH keys:
  - echo "Host heroku.com" >> ~/.ssh/config
  - echo "   StrictHostKeyChecking no" >> ~/.ssh/config
  - echo "   CheckHostIP no" >> ~/.ssh/config
  - echo "   UserKnownHostsFile=/dev/null" >> ~/.ssh/config
  # Clear your current Heroku SSH keys:
  - heroku keys:clear
  # Add a new SSH key to Heroku
  - yes | heroku keys:add
  # Push to Heroku!
  - yes | git push heroku master
Run Code Online (Sandbox Code Playgroud)

我在开头就得到了以下构建错误:

找不到Rakefile(寻找:rakefile,Rakefile,rakefile.rb,Rakefile.rb)

可能是因为我的yml文件出了问题,它试图使用默认的ruby构建器.

我不认为该文件是无效的yml文件,因为我已经在http://yamllint.com/上使用yml验证器进行了检查.

我的特拉维斯特定配置有什么问题吗?

package.json看起来像这样:

{
  "name": "csnc",
  "description": "csnc",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "express": "3.x",
    "ejs": ">=0.0.0",
    "express-partials": ">=0.0.0"
  },
  "engines": {
    "node": "0.8.x",
    "npm": "1.1.x"
  }
}
Run Code Online (Sandbox Code Playgroud)

编辑:

如果您正在寻找一种使用Travis-CI自动将node.js应用程序部署到Heroku的方法,请查找我为工作.travis.yml文件包含的答案

Mic*_*ley 6

您的.travis.yml文件未验证; 您可以在http://lint.travis-ci.org/验证它.

发现node_js键的问题:

检测到不受支持的Node.js版本.有关受支持的Node.js版本的最新列表,请参阅http://bit.ly/travis-ci-environment上的 Travis CI文档.

尝试使用0.8.x.