github - Heroku 部署分支失败
问题描述
我对 Heroku 有疑问,我正在尝试构建自己的不和谐机器人,我按照教程https://youtu.be/8qIsRzV0Hpg但我遇到了问题,无法部署它,这是错误:
-----> Building on the Heroku-20 stack
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 14.x...
Downloading and installing node 14.15.4...
Using default npm version: 6.14.10
-----> Installing dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
> @discordjs/opus@0.4.0 install /tmp/build_12ef9cfb_/node_modules/@discordjs/opus
> node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! @discordjs/opus@0.4.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the @discordjs/opus@0.4.0 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.Lv9o4/_logs/2021-02-09T14_07_39_023Z-debug.log
Some possible problems:
- node_modules checked into source control
- Node version not specified in package.json
! Push rejected, failed to compile Node.js app.
! Push failed
解决方案
推荐阅读
- visual-studio-code - 在 VSCode 中为文件添加标签
- vba - 我已经读过使用工作表的代码名称是引用它的最佳方式。但是代码名称不是像全局变量一样,因此使用起来也有风险吗?
- java - Spring Boot 中是否有最佳实践来记录使用 @ConfigurationProperties 注释的属性 bean?
- android - 汽车转向/漂移检测算法
- c# - 如何使用 .Net TPL DataFlow 或响应式扩展同时处理发布到 RabbitMQ 的动态消息?
- node.js - 默恩斯塔克。如何在 React 上创建评论后立即重新加载评论
- python - 从网页中提取数据
- python - Python 类多态性
- flutter - Flutter Listview过滤器不重建类型列表
- javascript - 修复 React Hook useEffect 缺少依赖项