在heroku上安装凉亭

时间:2014-09-22 15:10:58

标签: node.js heroku bower

我正在使用heroku和flask。我试图在heroku上使用multibuild包来构建我的依赖项。我遇到了this repo并按照说明操作。

首先,我设置了我的BUILDPACK_URL并检查了它

=== corvid Config Vars
BUILDPACK_URL:               https://github.com/ddollar/heroku-buildpack-multi.git

.buildpacks文件:

https://github.com/heroku/heroku-buildpack-nodejs
https://github.com/ejholmes/heroku-buildpack-bower
https://github.com/heroku/heroku-buildpack-python

我的package.json如下所示:

{
  "dependencies": {
    "bower": "latest"
  }
}

我将项目部署到heroku,但在尝试部署时最终会收到以下错误。

=====> Downloading Buildpack: https://github.com/ejholmes/heroku-buildpack-bower
=====> Detected Framework: Bower buildpack

module.js:340
    throw err;
          ^
Error: Cannot find module 'bower-logger'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/tmp/build_4a6d8bfa-5458-4908-95bc-e6f3af6d5b2a/node_modules/bower/bin/bower:8:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

 !     Push rejected, failed to compile Multipack app

这里有什么问题?

可以找到完整的项目文件here

1 个答案:

答案 0 :(得分:1)

答案不是很多,对不起,但评论太多了......

当我这样做时:

  1. git clone https://github.com/DarkCrowz/corvid_site.git
  2. cd corvid_site
  3. heroku create
  4. heroku config:设置BUILDPACK_URL = https://github.com/ddollar/heroku-buildpack-multi
  5. git push heroku master
  6. 看起来它部署得很好,至少完成了bower buildpack并安装了bower-logger。 凉亭需要凉亭记录器。您是否在部署的站点中看到了它?

    heroku run "ls node_modules/bower/node_modules"