【问题标题】:Heroku Buildpack with Apache, PHP and GruntHeroku Buildpack 与 Apache、PHP 和 Grunt
【发布时间】:2014-05-22 14:04:11
【问题描述】:

我使用这个 Heroku Buildpack 来编译我最近在 Heroku https://github.com/gcpantazis/heroku-buildpack-php-gruntjs 上的项目

它适用于 Node 版本 0.8.x。但是,当我更改为 Node 版本 0.10.x 并将代码推送到 heroku 时,它向我显示此错误“无法使用 npm 安装 -g grunt-cli --silent 依赖项”。

任何帮助将不胜感激。

【问题讨论】:

    标签: php node.js heroku gruntjs


    【解决方案1】:

    您可以使用 heroku-buildpack-multi 组合常规的 PHP 和 Node.js 构建包。示例:http://heroku-multipack-nodejs-php-ex.herokuapp.com

    【讨论】:

      【解决方案2】:

      我们使用两个构建包来使我们能够使用 Grunt 编译前端资产

      $ heroku buildpacks:set heroku/nodejs Buildpack set. Next release on your-application will use heroku/nodejs. Run git push heroku master to create a new release using this buildpack. $ heroku buildpacks:set heroku/php --index 2 Buildpack set. Next release on your-application will use: 1. heroku/nodejs 2. heroku/php Run git push heroku master to create a new release using these buildpacks.

      【讨论】:

        猜你喜欢
        • 2015-05-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-03-21
        • 2018-06-28
        • 1970-01-01
        • 2021-05-19
        相关资源
        最近更新 更多