Не удалось развернуть на героку nodejs - PullRequest
1 голос
/ 28 марта 2020

Я размещаю своего бота разногласий на heroku. Когда я пытаюсь развернуть его, произошедшая ошибка выглядит как ошибка узла (404); диссонанс js:. 12.1.1; узел: я пробовал обе версии узла 12.x и 13.x, но с одной и той же ошибкой, к сожалению, я не могу использовать версию узла ниже 12. Это вызывает диссонанс. 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

1 Ответ

0 голосов
/ 28 марта 2020

Удалив пакет ffmpeg-binaries из пакета. json решил мою проблему. Спасибо

...