【问题标题】:Heroku node app deployment failingHeroku 节点应用程序部署失败
【发布时间】:2015-02-28 04:53:39
【问题描述】:

部署从今天(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

【问题讨论】:

    标签: node.js git heroku github


    【解决方案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。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-20
      • 2017-12-17
      • 2018-08-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-05
      • 2023-03-06
      相关资源
      最近更新 更多