Heroku 上的节点画布

问题描述

我有一个 discord.js bot,它在 Heroku 上运行。 我刚刚添加了画布,现在机器人无法构建。

这是日志:

GroupChat (Firebase Instance) :
       -MOQCkcEN64G8cwrDKsa (group id) :
                    -MPFpHa5ki_eRg-UOMYY (message id) :
                          date: "Dec 23,2020"
                          from: "xlKbnI2LuwaH10sNaeO3PJvizlu2"
                          message: "second"
                          messageID: "-MPFpHa5ki_eRg-UOMYY"
                          seen: false
                          time: "11:50 PM"
                          to: "-MOQCkcEN64G8cwrDKsa"
                          type: "topic"

我已经按照日志建议安装了 node-pre-gyp,但没有任何改变。 这是 package.json:

-----> Installing dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       
       > canvas@2.6.1 install /tmp/build_c8ad4f45_/node_modules/canvas
       > node-pre-gyp install --fallback-to-build
       
       sh: 1: node-pre-gyp: Permission denied
       npm ERR! code ELIFECYCLE
       npm ERR! errno 126
       npm ERR! canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`
       npm ERR! Exit status 126
       npm ERR! 
       npm ERR! Failed at the canvas@2.6.1 install script.
       npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.uZg6i/_logs/2021-01-01T17_53_37_239Z-debug.log
-----> Build Failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       Some possible problems:
       
       - node_modules checked into source control
         https://devcenter.heroku.com/articles/node-best-practices#only-git-the-important-bits
       
       - Node version not specified in package.json
         https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
       
       love,Heroku
       
 !     Push rejected,Failed to compile Node.js app.
 !     Push Failed

有人知道解决办法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)