Cedar-14 在 heroku node.js 应用程序中使用 coffeescript 与 aergonaut 的自定义构建包不兼容
Cedar-14 incompatibility using coffeescript in heroku node.js app with custom buildpack from aergonaut
我正在使用 this custom buildpack with my heroku node.js app, in order to write my app in coffeescript. Using the classic cedar stack, everything has been working fine for over a year. But that stack is scheduled to be deprecated in November 2015, in favor of the Cedar-14 堆栈。
我遵循 upgrade instructions,当我将我的应用程序推送到 heroku 时(没有任何代码更改),自定义构建包在编译阶段无法正常工作。具体来说,它无法检测到我的应用程序所依赖的 node.js 版本,并将其默认为 0.4.7,这太旧了,我的应用程序和 heroku 将无法使用该版本。
这是编译阶段的输出:
$ git push heroku HEAD:master
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 635 bytes | 0 bytes/s, done.
Total 7 (delta 6), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... done
remote: -----> Coffeescript app detected
remote: -----> Resolving engine versions
remote:
remote: WARNING: No version of Node.js specified in package.json, see:
remote: https://devcenter.heroku.com/articles/nodejs-versions
remote:
remote: WARNING: The default version of Node.js and npm on Heroku will begin
remote: tracking the latest stable release starting September 1, 2012.
remote:
remote: Using Node.js version: 0.4.7
remote: Using npm version: 1.0.106
我的 package.json 正确列出了节点版本,并且它一直在与 cedar 堆栈一起工作:
"engines": {
"node": "0.10.x",
"npm": "1.3.x"
}
This is the line of code 在尝试确定节点版本的自定义构建包中。当我手动模拟时,它工作得很好。但是当这个检测发生在推送到 heroku 的过程中时,它会失败。
$ cat package.json | node /usr/local/bin/json engines.node
0.12.x
Heroku 的指南似乎建议构建包必须专门支持新的 cedar-14 堆栈:here。但是我看不出我正在使用的这个自定义构建包有什么问题。
与 Chris Fung about this - the original author of the custom buildpack in question, and he suggested rebasing his buildback to the latest nodejs official Heroku buildpack. I did that in my own fork of the repo 交谈过。
然后我将我的 coffeescript 应用程序堆栈更改为 Cedar-14,并将构建包更改为此 new one。现在一切正常。
$ heroku buildpacks:set https://github.com/sailrish/heroku-buildpack-coffee
$ heroku stack:set cedar-14
$ git push heroku master
我正在使用 this custom buildpack with my heroku node.js app, in order to write my app in coffeescript. Using the classic cedar stack, everything has been working fine for over a year. But that stack is scheduled to be deprecated in November 2015, in favor of the Cedar-14 堆栈。
我遵循 upgrade instructions,当我将我的应用程序推送到 heroku 时(没有任何代码更改),自定义构建包在编译阶段无法正常工作。具体来说,它无法检测到我的应用程序所依赖的 node.js 版本,并将其默认为 0.4.7,这太旧了,我的应用程序和 heroku 将无法使用该版本。
这是编译阶段的输出:
$ git push heroku HEAD:master
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 635 bytes | 0 bytes/s, done.
Total 7 (delta 6), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... done
remote: -----> Coffeescript app detected
remote: -----> Resolving engine versions
remote:
remote: WARNING: No version of Node.js specified in package.json, see:
remote: https://devcenter.heroku.com/articles/nodejs-versions
remote:
remote: WARNING: The default version of Node.js and npm on Heroku will begin
remote: tracking the latest stable release starting September 1, 2012.
remote:
remote: Using Node.js version: 0.4.7
remote: Using npm version: 1.0.106
我的 package.json 正确列出了节点版本,并且它一直在与 cedar 堆栈一起工作:
"engines": {
"node": "0.10.x",
"npm": "1.3.x"
}
This is the line of code 在尝试确定节点版本的自定义构建包中。当我手动模拟时,它工作得很好。但是当这个检测发生在推送到 heroku 的过程中时,它会失败。
$ cat package.json | node /usr/local/bin/json engines.node
0.12.x
Heroku 的指南似乎建议构建包必须专门支持新的 cedar-14 堆栈:here。但是我看不出我正在使用的这个自定义构建包有什么问题。
与 Chris Fung about this - the original author of the custom buildpack in question, and he suggested rebasing his buildback to the latest nodejs official Heroku buildpack. I did that in my own fork of the repo 交谈过。
然后我将我的 coffeescript 应用程序堆栈更改为 Cedar-14,并将构建包更改为此 new one。现在一切正常。
$ heroku buildpacks:set https://github.com/sailrish/heroku-buildpack-coffee
$ heroku stack:set cedar-14
$ git push heroku master