首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >当我部署到Heroku时,“在lzma-native@3.0.8安装脚本失败”

当我部署到Heroku时,“在lzma-native@3.0.8安装脚本失败”
EN

Stack Overflow用户
提问于 2021-01-31 00:47:31
回答 1查看 918关注 0票数 0

每当我尝试部署我的discord.js机器人时,我得到一个错误Failed at the lzma-native@3.0.8 install script,我指定了node.js版本,我试图指定npm版本,但我仍然得到相同的问题。我正在使用Node.js 14.15.4和npm 6.14.10这里是完整的日志:

代码语言:javascript
运行
复制
-----> 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):  14.x
       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
       Installing node modules
       
       > nodemon@2.0.7 postinstall /tmp/build_96ae59ea_/node_modules/nodemon
       > node bin/postinstall || exit 0
       
       Love nodemon? You can now support the project via the open collective:
        > https://opencollective.com/nodemon/donate
       
       
       > lzma-native@3.0.8 install /tmp/build_96ae59ea_/node_modules/lzma-native
       > node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build
       
       node-pre-gyp ERR! Tried to download(404): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v83-linux-x64.tar.gz 
       node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@14.15.4 (node-v83 ABI, glibc) (falling back to source compile with node-gyp) 
       node-pre-gyp ERR! Tried to download(undefined): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v83-linux-x64.tar.gz 
       node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@14.15.4 (node-v83 ABI, glibc) (falling back to source compile with node-gyp) 
       gyp: Call to 'sh liblzma-config.sh "/tmp/build_96ae59ea_/node_modules/lzma-native/build" "/tmp/build_96ae59ea_/node_modules/lzma-native/deps/xz-5.2.3.tar.bz2"' returned exit status 77 while in binding.gyp. while trying to load binding.gyp
       gyp ERR! configure error 
       gyp ERR! stack Error: `gyp` failed with exit code: 1
       gyp ERR! stack     at ChildProcess.onCpExit (/tmp/build_96ae59ea_/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
       gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
       gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
       gyp ERR! System Linux 4.4.0-1083-aws
       gyp ERR! command "/tmp/build_96ae59ea_/.heroku/node/bin/node" "/tmp/build_96ae59ea_/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/tmp/build_96ae59ea_/node_modules/lzma-native/binding-v3.0.8-node-v83-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/tmp/build_96ae59ea_/node_modules/lzma-native/binding-v3.0.8-node-v83-linux-x64"
       gyp ERR! cwd /tmp/build_96ae59ea_/node_modules/lzma-native
       gyp ERR! node -v v14.15.4
       gyp ERR! node-gyp -v v5.1.0
       gyp ERR! not ok 
       node-pre-gyp ERR! build error 
       node-pre-gyp ERR! stack Error: Failed to execute '/tmp/build_96ae59ea_/.heroku/node/bin/node /tmp/build_96ae59ea_/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/build_96ae59ea_/node_modules/lzma-native/binding-v3.0.8-node-v83-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/tmp/build_96ae59ea_/node_modules/lzma-native/binding-v3.0.8-node-v83-linux-x64' (1)
       node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/build_96ae59ea_/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
       node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
       node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
       node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
       node-pre-gyp ERR! System Linux 4.4.0-1083-aws
       node-pre-gyp ERR! command "/tmp/build_96ae59ea_/.heroku/node/bin/node" "/tmp/build_96ae59ea_/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
       node-pre-gyp ERR! cwd /tmp/build_96ae59ea_/node_modules/lzma-native
       node-pre-gyp ERR! node -v v14.15.4
       node-pre-gyp ERR! node-pre-gyp -v v0.6.39
       node-pre-gyp ERR! not ok 
       Failed to execute '/tmp/build_96ae59ea_/.heroku/node/bin/node /tmp/build_96ae59ea_/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/build_96ae59ea_/node_modules/lzma-native/binding-v3.0.8-node-v83-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/tmp/build_96ae59ea_/node_modules/lzma-native/binding-v3.0.8-node-v83-linux-x64' (1)
       npm ERR! code ELIFECYCLE
       npm ERR! errno 1
       npm ERR! lzma-native@3.0.8 install: `node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build`
       npm ERR! Exit status 1
       npm ERR! 
       npm ERR! Failed at the lzma-native@3.0.8 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.Ci6p9/_logs/2021-01-30T16_41_27_068Z-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
       
       If you're stuck, please submit a ticket so we can help:
       https://help.heroku.com/
       
       Love,
       Heroku
       
 !     Push rejected, failed to compile Node.js app.
 !     Push failed
EN

回答 1

Stack Overflow用户

发布于 2021-01-31 15:42:02

出现问题的原因是因为与依赖项ffmpeg-binaries发生冲突,所以我基本上卸载了它。

代码语言:javascript
运行
复制
npm uninstall ffmpeg-binaries
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65970550

复制
相关文章

相似问题

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