簡體   English   中英

無法在 heroku nodejs 上部署

[英]Failed to deploy on heroku nodejs

我在 heroku 上托管我的不和諧機器人。 當我嘗試部署它時,出現錯誤,看起來像 node-gyp 錯誤(404); discord.js:12.1.1; 節點:我嘗試了節點 12.x 和 13.x 的兩個版本但同樣的錯誤,不幸的是我不能使用低於 12 的節點版本,因為 discord.js v12 需要節點 12 或更高版本。,Npm:默認版本

錯誤:

-----> Node.js app detected

-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       NODE_VERBOSE=false

-----> Installing binaries
       engines.node (package.json):  13.x
       engines.npm (package.json):   unspecified (use default)

       Resolving node version 13.x...
       Downloading and installing node 13.11.0...
       Using default npm version: 6.13.7

-----> Restoring cache
       Cached directories were not restored due to a change in version of node, npm, yarn or stack
       Module installation may take longer for this build

-----> Installing dependencies
       Installing node modules (package.json)

       > lzma-native@3.0.8 install /tmp/build_d6cd505b410e838b6013b4c8f2c3d138/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-v79-linux-x64.tar.gz 
       node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@13.11.0 (node-v79 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-v79-linux-x64.tar.gz 
       node-pre-gyp ERR! Pre-built binaries not found for lzma-native@3.0.8 and node@13.11.0 (node-v79 ABI, glibc) (falling back to source compile with node-gyp) 
       gyp: Call to 'sh liblzma-config.sh "/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/build" "/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/deps/xz-5.2.3.tar.bz2"' returned exit status 1 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_d6cd505b410e838b6013b4c8f2c3d138/.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:275:12)
       gyp ERR! System Linux 4.4.0-1062-aws
       gyp ERR! command "/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/.heroku/node/bin/node" "/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/binding-v3.0.8-node-v79-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/binding-v3.0.8-node-v79-linux-x64"
       gyp ERR! cwd /tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native
       gyp ERR! node -v v13.11.0
       gyp ERR! node-gyp -v v5.0.7
       gyp ERR! not ok 
       node-pre-gyp ERR! build error 
       node-pre-gyp ERR! stack Error: Failed to execute '/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/.heroku/node/bin/node /tmp/build_d6cd505b410e838b6013b4c8f2c3d138/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/binding-v3.0.8-node-v79-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/binding-v3.0.8-node-v79-linux-x64' (1)
       node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/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:1026:16)
       node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
       node-pre-gyp ERR! System Linux 4.4.0-1062-aws
       node-pre-gyp ERR! command "/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/.heroku/node/bin/node" "/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
       node-pre-gyp ERR! cwd /tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native
       node-pre-gyp ERR! node -v v13.11.0
       node-pre-gyp ERR! node-pre-gyp -v v0.6.39
       node-pre-gyp ERR! not ok 
       Failed to execute '/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/.heroku/node/bin/node /tmp/build_d6cd505b410e838b6013b4c8f2c3d138/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/binding-v3.0.8-node-v79-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/binding-v3.0.8-node-v79-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.
       gyp: Call to 'sh liblzma-config.sh "/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/build" "/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/deps/xz-5.2.3.tar.bz2"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp

       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.tNmy7/_logs/2020-03-28T14_37_06_981Z-debug.log
       gyp ERR! configure error 
       gyp ERR! stack Error: `gyp` failed with exit code: 1
       gyp ERR! stack     at ChildProcess.onCpExit (/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/.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:275:12)
       gyp ERR! System Linux 4.4.0-1062-aws
       gyp ERR! command "/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/.heroku/node/bin/node" "/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/binding-v3.0.8-node-v79-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native/binding-v3.0.8-node-v79-linux-x64"
       gyp ERR! cwd /tmp/build_d6cd505b410e838b6013b4c8f2c3d138/node_modules/lzma-native
       gyp ERR! node -v v13.11.0
       gyp ERR! node-gyp -v v5.0.7
       gyp ERR! not ok 
-----> 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
Build finished

通過從 package.json 中刪除ffmpeg-binaries包解決了我的問題。 謝謝

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM