I'm trying to install ffmpeg-binaries it works perfectly local but when I go to hiroku it starts to say that he can't find the modules.
This is for a Discord bot, running node.js I tried to install with npm other ffmpeg's but only that works without implementing the ffmpeg itself
Installing node modules (package.json + package-lock)
> lzma-native#3.0.8 install /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/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-v67-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for lzma-native#3.0.8 and node#11.6.0 (node-v67 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-v67-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for lzma-native#3.0.8 and node#11.6.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
gyp: Call to 'sh liblzma-config.sh "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/build" "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/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_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:188:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.4.0-1031-aws
gyp ERR! command "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/bin/node" "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64"
gyp ERR! cwd /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/bin/node /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/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:188:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Linux 4.4.0-1031-aws
node-pre-gyp ERR! command "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/bin/node" "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native
node-pre-gyp ERR! node -v v11.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/bin/node /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64' (1)
gyp: Call to 'sh liblzma-config.sh "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/build" "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/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_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:188:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.4.0-1031-aws
gyp ERR! command "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/bin/node" "/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native/binding-v3.0.8-node-v67-linux-x64"
gyp ERR! cwd /tmp/build_681c54b9c6315cfb1c9672e8da7d4803/node_modules/decompress-tarxz/node_modules/lzma-native
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
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.85YKx/_logs/2019-01-13T20_55_48_321Z-debug.log
Ah, the infamous node-pre-gyp install --fallback-to-build (responsible for the fail of your deployment). On the Github of mapbox/node-pre-gyp, there are 70 different issues referencing errors on this exact command! node-pre-gyp is a very buggy package to install - especially when it comes to cross-OS behavior - so some solutions might work for you, some won't.
In this issue, Nicolas Noble (author of the GRPC package) pointed out that the issue arose from incompatible versions of NodeJS and GRPC. Check that your local version of NodeJS is compatible with the one that is running on Heroku, else check Heroku's guide on specifying a Node version.
In this issue, user takase1121 had a very similar error log as you, looking like:
> lzma-native#4.0.2 install [...]Node.js [...]node_modules/lzma-native
> node-pre-gyp install --fallback-to-build && rimraf build
[...]
node-pre-gyp WARN Tried to download(404): [...]
[...]
People mentionned also ffmpeg libraries in this issue, which is still open however.
Finally in this issue, user OceanHorn made the (almost) exact same command as you work fine!
> lzma-native#3.0.2 install /Users/OceanHorn/SourceTree/mmms/node_modules/lzma-native
> node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build
[lzma-native] Success [...]
One tiny difference: the version of lzma-native is 3.0.2, not like your 3.0.8 - using this version of lzma-native might solve your problem. Since it is only a patch version difference, you should be able to use version 3.0.2 without any change in your code.
Related
I get a similar error to a whole lot of other stack threads. However after trying many of the suggested solutions I am still stuck. I am running
npm install
in a cloned git project folder when trying to run an angular application. This yields the following error:
> grpc#1.10.1 install /Users/my_usrname/my_project/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-darwin-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc#1.10.1 and node#10.15.3 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Pre-built binaries not installable for grpc#1.10.1 and node#10.15.3 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
rm: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
gyp CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/my_usrname/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/Users/my_usrname/.nvm/versions/node/v10.15.3/bin/node" "/Users/my_usrname/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/my_usrname/my_project-master/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/my_usrname/my_project-master/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/my_usrname/my_project-master/node_modules/grpc
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/my_usrname/.nvm/versions/node/v10.15.3/bin/node /Users/my_usrname/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/my_usrname/my_project-master/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/my_usrname/my_project-master/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/my_usrname/my_project-master/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/Users/my_usrname/.nvm/versions/node/v10.15.3/bin/node" "/Users/my_usrname/my_project-master/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/my_usrname/my_project-master/node_modules/grpc
node-pre-gyp ERR! node -v v10.15.3
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/my_usrname/.nvm/versions/node/v10.15.3/bin/node /Users/my_usrname/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/my_usrname/my_project-master/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/my_usrname/my_project-master/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.oe
../deps/grpc/src/core/lib/backoff/backoff.cc:23:10: fatal error: l: Failed to e
'src/core/lib/gpr/useful.h' file not found
#include "src/core/lib/gpr/useful.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/my_usrname/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/Users/my_usrname/.nvm/versions/node/v10.15.3/bin/node" "/Users/my_usrname/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/myusrname/my_project-master/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/my_usrname/my_project-master/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/my_usrname/my_project-master/node_modules/grpc
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN #angular/flex-layout#2.0.0-beta.12 requires a peer of #angular/core#~5.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN #angular/flex-layout#2.0.0-beta.12 requires a peer of #angular/common#~5.1.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.10.1 install: `node-pre-gyp install --fallback-to-build -- <pre><code>library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.10.1 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! /Users/my_usrname/.npm/_logs/2019-03-21T19_25_09_711Z-debug.log
I have node version v10.15.3, npm verison 6.9.0.
About angular:
Angular CLI: 1.7.4
Node: 10.15.3
OS: darwin x64
Angular: 5.2.4
I have tried uninstalling node, restarting computer and reinstalling node as some have suggested. Installed node-gyp globaly as I found in another answer.
I am able to run this angular application however, from following angular quick start at https://angular.io/guide/quickstart
There are two main issues here. First, grpc#1.10.1 is a fairly old version of the library, and it does not have support for Node 10, which is newer. If you are explicitly depending on that version of grpc or one of your dependencies is, you should try to update the dependency or get your dependency to do so. Alternatively, I believe that version of grpc supports Node 8, so you can downgrade your Node version to get it working.
Second, I am guessing from the mention of Angular that your are going to want to run this on a browser client. That will not work; grpc simply does not work on browsers. If you are using grpc directly you may be able to use grpc-web instead on the browser.
I am trying to install opencv for vehicle detection in realtime. While installing opencv in terminal it always fail to install
Parameshs-MacBook-Air:pyrky_nodejs parameshv$ npm install opencv --save
opencv#6.0.0 install /Users/parameshv/pyrky_nodejs/node_modules/opencv
node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for opencv#6.0.0 and node#10.8.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for opencv#6.0.0 and node#10.8.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
CXX(target) Release/obj.target/opencv/src/init.o
CXX(target) Release/obj.target/opencv/src/init.o
sed: ./Release/.deps/Release/obj.target/opencv/src/init.o.d.raw: No such file or directory
make: *** [Release/obj.target/opencv/src/init.o] Error 1
CXX(target) Release/obj.target/opencv/src/Matrix.o
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node" "--module_name=opencv" "--module_path=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64"
gyp ERR! cwd /Users/parameshv/pyrky_nodejs/node_modules/opencv
gyp ERR! node -v v10.8.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/parameshv/pyrky_nodejs/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:249:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.8.0/bin/node" "/Users/parameshv/pyrky_nodejs/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/parameshv/pyrky_nodejs/node_modules/opencv
node-pre-gyp ERR! node -v v10.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64' (1)
npm WARN opencv#6.0.0 had bundled packages that do not match the required version(s). They have been replaced with non-bundled versions.
npm WARN pyrky#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv#6.0.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv#6.0.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! /Users/parameshv/.npm/_logs/2018-09-04T05_34_09_181Z-debug.log
Parameshs-MacBook-Air:pyrky_nodejs parameshv$
Parameshs-MacBook-Air:pyrky_nodejs parameshv$
Parameshs-MacBook-Air:pyrky_nodejs parameshv$ ../src/Matrix.cc:2:10: fatal error: 'Matrix.h' file not found
include "Matrix.h"
^~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/opencv/src/Matrix.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node" "--module_name=opencv" "--module_path=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64"
gyp ERR! cwd /Users/parameshv/pyrky_nodejs/node_modules/opencv
gyp ERR! node -v v10.8.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Tried to fix this installing
brew tap brewsci/science
brew install pkg-config opencv#2
brew link opencv#2 --force
npm install opencv --save
How to install opencv npm in mac os? Any help much appreciates pls....
I'm running Ubuntu 17.04
node version: 8.0.0
npm version: 5.3.0
node-gyp version: 3.6.2
csaba#titan:~/GitRepos/valleydevfest2017$ sudo npm install -g iltorb
> iltorb#1.3.5 install /usr/local/lib/node_modules/iltorb
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(undefined): https://github.com /MayhemYDG/iltorb/releases/download/1.3.5/node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for iltorb#1.3.5 and node#8.0.0 (node-v57 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local /lib/node_modules/iltorb/build'
gyp ERR! System Linux 4.10.0-28-lowlatency
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/iltorb/build/bindings/iltorb.node" "--module_name=iltorb" "--module_path=/usr/local/lib/node_modules/iltorb/build/bindings"
gyp ERR! cwd /usr/local/lib/node_modules/iltorb
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/iltorb/build/bindings/iltorb.node --module_name=iltorb --module_path=/usr/local/lib/node_modules/iltorb/build/bindings' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/iltorb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Linux 4.10.0-28-lowlatency
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/iltorb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/iltorb
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/iltorb/build/bindings/iltorb.node --module_name=iltorb --module_path=/usr/local/lib/node_modules/iltorb/build/bindings' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iltorb#1.3.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iltorb#1.3.5 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! /home/csaba/.npm/_logs/2017-08-11T04_34_39_178Z-debug.log
Now firebase-tools doesn't work at all. I wish I stayed with v3.9.0.
Filed an issue: https://github.com/MayhemYDG/iltorb/issues/46
What can I do?
I had the same problem today, after reading many things and trying many things (e.g. sudo npm install -g gyp-node) nothing worked, untill I stumbled on NPM's unsafe-perm flag:
--unsafe-perm
WARNING: Use with care and read the documentation first
But it fixed my problem and hopefully yours too.
I've found other issues regarding fallback to binary build for other node packages but none for Realm. I've tried some solutions from other scenarios such as:
removing /home/.node-gyp,
installing build-essential / installing libkrb5-dev,
removing node_modulesfrom project root and node-gyp and then doing a fresh npm install
Yet when I run npm install --save realm I get this error trace:
node-pre-gyp ERR! Tried to download(404): https://static.realm.io/node-pre-gyp/realm-v1.2.0-node-v51-linux-ia32.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for realm#1.2.0 and node#7.5.0 (node-v51 ABI) (falling back to source compile with node-gyp)
make: Entering directory `/home/..../node_modules/realm/build'
ACTION binding_gyp_vendored_realm_target_download_realm /home/..../node_modules/realm/vendor/realm-node
Downloading dependency: realm-node 2.4.0
Using cached realm-node from TMPDIR
Skipping the sync download because ENABLE_SYNC is false.
TOUCH Release/obj.target/vendored-realm.stamp
TOUCH Release/obj.target/realm-core.stamp
CXX(target) Release/obj.target/object-store/src/object-store/src/binding_callback_thread_observer.o
g++: error: unrecognized command line option ‘-std=c++14’
make: *** [Release/obj.target/object-store/src/object-store/src/binding_callback_thread_observer.o] Error 1
make: Leaving directory `/home/..../node_modules/realm/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:192:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-75-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/./node_modules/realm/compiled/node-v51_linux_ia32/realm.node" "--module_name=realm" "--module_path=/home/..../node_modules/realm/compiled/node-v51_linux_ia32"
gyp ERR! cwd /home/..../node_modules/realm
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/..../node_modules/realm/compiled/node-v51_linux_ia32/realm.node --module_name=realm --module_path=/home/..../node_modules/realm/compiled/node-v51_linux_ia32' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/..../node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:192:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:890:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.4.0-75-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/..../node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/..../node_modules/realm
node-pre-gyp ERR! node -v v7.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/..../node_modules/realm/compiled/node-v51_linux_ia32/realm.node --module_name=realm --module_path=/home/..../node_modules/realm/compiled/node-v51_linux_ia32' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! realm#1.2.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the realm#1.2.0 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the realm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
I am using node version 7.5.0 and npm version 4.5.0.
I have the node-pre-gyp package.
What is going on?!
Try the following step by step,
Install the older version in the project folder
npm install --save realm#0.14.3
Open node_modules/realm/package.json and remove this line:
"postlink": "node_modules/realm/scripts/rnpm-postlink.js"
Link
react-native link realm
The solution was found here
I am trying to install node package 'sqlite3' on linux based arm processor. I get error when I try to install the package. However if I try installing the same package on ubuntu, it goes through.
I am using Linux Kernel 3.14.52-v2.6b2+g7c83cef on the arm processor.
The command I use for sqlite3 installation is npm install sqlite3. I did try this link but of no use.
I get a different error
root#colibri-imx6:~# npm install sqlite3
-\|-\
> sqlite3#3.1.8 install /home/root/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v14-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3#3.1.8 and node#0.12.7 (node-v14 ABI) (falling back to source compile with node-gyp
make: Entering directory '/home/root/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
make: cc: Command not found
deps/sqlite3.target.mk:117: recipe for target 'Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o' failed
make: *** [Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o] Error 127
make: Leaving directory '/home/root/node_modules/sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.14.52-v2.6b2+g7c83cef
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/h"
gyp ERR! cwd /home/root/node_modules/sqlite3
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallb)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/root/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
node-pre-gyp ERR! System Linux 3.14.52-v2.6b2+g7c83cef
node-pre-gyp ERR! command "node" "/home/root/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/root/node_modules/sqlite3
node-pre-gyp ERR! node -v v0.12.7
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/roo)
npm ERR! Linux 3.14.52-v2.6b2+g7c83cef
npm ERR! argv "node" "/usr/bin/npm" "install" "sqlite3"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! sqlite3#3.1.8 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3#3.1.8 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/root/npm-debug.log
root#colibri-imx6:~#
I installed python-compiler, python-modules, and now gcc to take care of cc command but nothing is working. Has anyone encountered this problem ?
It may be because your arm based processor don't have a C compiler (usually gcc for linux) bundled with the OS...
The debug log tells that the packages fails on compiling native sources.
I can't tell you this is the cause for sure but you should give a try on that way !
I installed node sqlite3 on ubuntu arm64 successfully with
sudo apt install python
That’s because node-sqlite3 need python2 to compile.
Ubuntu use python3 by default.