【问题标题】:node-qrcode install on heroku在heroku上安装node-qrcode
【发布时间】:2012-07-28 13:06:08
【问题描述】:

我在 heroku 上安装这个包时遇到问题。 有什么办法吗?

我看到是画布模块的问题,但我不知道该怎么办。

这是heroku上的安装日志。我不知道如何获得更多:

npm ERR! canvas@0.12.1 preinstall: `node-waf configure build`
       npm ERR! `sh "-c" "node-waf configure build"` failed with 1
       npm ERR! 
       npm ERR! Failed at the canvas@0.12.1 preinstall script.
       npm ERR! This is most likely a problem with the canvas package,
       npm ERR! not with npm itself.
       npm ERR! Tell the author that this fails on your system:
       npm ERR!     node-waf configure build
       npm ERR! You can get their info via:
       npm ERR!     npm owner ls canvas
       npm ERR! There is likely additional logging output above.

       npm ERR! System Linux 2.6.32-343-ec2
       npm ERR! command "/tmp/node-node-La1F/bin/node" "/tmp/node-npm-6Xts/cli.js" "install" "--production"
       npm ERR! cwd /tmp/build_3ejt8evom1p0g
       npm ERR! node -v v0.6.18
       npm ERR! npm -v 1.1.41
       npm ERR! code ELIFECYCLE
       npm ERR! stack Error: canvas@0.12.1 preinstall: `node-waf configure build`
       npm ERR! stack `sh "-c" "node-waf configure build"` failed with 1
       npm ERR! stack     at ChildProcess.<anonymous> (/tmp/node-npm-6Xts/lib/utils/exec.js:56:20)
       npm ERR! stack     at ChildProcess.emit (events.js:70:17)
       npm ERR! stack     at maybeExit (child_process.js:362:16)
       npm ERR! stack     at Process.onexit (child_process.js:398:5)

【问题讨论】:

  • 你能发布你的完整构建输出吗?

标签: node.js heroku


【解决方案1】:

我成功使用了这个 Heroku 构建包: https://elements.heroku.com/buildpacks/mojodna/heroku-buildpack-cairo

但在其 README 中,它告诉您使用 heroku-buildpack-multi,但已弃用。我所做的是,在命令行中使用 Heroku Toolbelt:

heroku buildpacks:set --index 1 https://github.com/mojodna/heroku-buildpack-cairo.git

heroku buildpacks:添加 heroku/nodejs

然后推送到 Heroku,以便它可以再次构建包。

【讨论】:

    猜你喜欢
    • 2015-12-09
    • 2015-07-12
    • 2015-11-05
    • 2019-03-20
    • 2015-11-07
    • 2012-08-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多