首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >HEROKU : node-pre-gyp install --回退到构建

HEROKU : node-pre-gyp install --回退到构建
EN

Stack Overflow用户
提问于 2020-09-28 17:42:45
回答 1查看 618关注 0票数 1

自从我使用@discordjs/opus以来,我就遇到了这个问题,我看到到处都是类似的问题,没有什么能帮助我改变这个错误。它总是与node-pre-gyp有关。我首先尝试将它手动放到我的package.json中,构建成功了,但是没有声音播放,并且在构建日志中有很多警告消息……还有一些人对bcrypt有问题,但这里不是这样的。

谢谢你的帮忙!

代码语言:javascript
复制
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       NODE_VERBOSE=false

-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version 12.x...
       Downloading and installing node 12.18.4...
       Using default npm version: 6.14.6
       
-----> Restoring cache
       - node_modules is checked into source control and cannot be cached
       
-----> Installing dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       
       > @discordjs/opus@0.3.2 install /tmp/build_2510a47a_/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.3.2 install: `node-pre-gyp install --fallback-to-build`
       npm ERR! Exit status 126
       npm ERR! 
       npm ERR! Failed at the @discordjs/opus@0.3.2 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.N30Iz/_logs/2020-09-28T09_36_00_646Z-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`
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-09-30 04:44:57

正如JM-AGMS所说,解决方案是使包锁可见,在包中键入节点引擎,然后删除节点模块文件夹,以获得成功的构建。

但是,关于节点前gyp的错误仍然存在。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64099693

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档