Heroku节点应用程序部署失败

时间:2015-01-01 16:00:46

标签: node.js git heroku github

部署从今天开始失败,即2015年1月1日突然变为heroku

+ git push git@ec2-54-187-2-82.us-west-2.compute.amazonaws.com:sky-tickets-dev/skytickets-front.git stage
Everything up-to-date
+ git push -f git@heroku.com:skytickets-stage.git stage:master
Fetching repository, done.

-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js

       Node engine:         0.10.21
       Npm engine:          1.2.x
       Start mechanism:     Procfile
       node_modules source: prebuilt
       node_modules cached: true

       NPM_CONFIG_PRODUCTION=true
       NODE_MODULES_CACHE=true

       PRO TIP: Avoid checking node_modules into source control
       See https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-

-----> Installing binaries
       Downloading and installing node 0.10.21...
       Resolving npm version 1.2.x via semver.io...
       Downloading and installing npm 1.2.8000 (replacing version 1.3.11)...

-----> Building dependencies
       Rebuilding any native modules for this architecture

-----> Checking startup method
       Found Procfile

-----> Finalizing build
       Creating runtime environment
       Exporting binary paths
       Cleaning up build artifacts
       Caching node_modules for future builds
       Build successful!
       skytickets@0.0.1 /tmp/build_604cc19d81766dfe5375fc2195373f74
       ├── UNMET DEPENDENCY async@0.2.x
       ├── UNMET DEPENDENCY basic-logger@0.4.x
       ├── UNMET DEPENDENCY cloudinary@1.0.x
       ├── UNMET DEPENDENCY express@3.4.x

1 个答案:

答案 0 :(得分:1)

我今天遇到了同样的问题。我们在Git中签了一些节点模块,在推送期间使用npm install安装了一些节点模块,问题是heroku-buildpack-nodejs最近更新为不再支持此功能。现在你需要承诺将所有模块签入Git或者没有签入 - 后者是更好的方法。

他们的README包含了一种使用以前版本的heroku-buildpack-nodejs修复此问题的方法:

  

对于大多数Node.js应用程序,这个buildpack应该可以正常工作。但是,如果您无法使用此新版本的buildpack进行部署,则可以通过将其锁定到以前的版本来重新启动应用程序:

heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v63 -a my-app
git commit -am "empty" --allow-empty
git push heroku master
     

然后请在help.heroku.com上打开支持服务单,以便我们诊断并让您的应用在默认的buildpack上运行。

如果你使用heroku-buildpack-multi作为你的buildpack(就像我一样),你可以改为添加"#v63" .buildpacks文件中buildpack URL的后缀。

相关问题