Can't install appmetrics with npm - npm

I'm trying to install access-watch with no success.
After cloning the repo I call npm i and I get the following error. It appears to occur when the installation process tries to install appmetrics. So I tried npm i appmetrics and got the exact same error, hence the title of this question.
Here's the tail of the trace,
$ cd access-watch
$ npm i
/home/gandalf/.cache/node-gyp/14.18.0/include/node/v8.h:6482:46: note: candidate expects 1 argument, 0 provided
Release/obj.target/appmetrics/geni/appmetrics.cpp: At global scope:
Release/obj.target/appmetrics/geni/appmetrics.cpp:641:13: warning: ‘bool isAppMetricsFile(std::__cxx11::string, std::__cxx11::string)’ defined but not used [-Wunused-function]
static bool isAppMetricsFile(std::string expected, std::string potentialMatch) {
^~~~~~~~~~~~~~~~
Makefile:282: recipe for target 'Release/obj.target/appmetrics/geni/appmetrics.o' failed
make: *** [Release/obj.target/appmetrics/geni/appmetrics.o] Error 1
make: Leaving directory '/home/gandalf/access-watch/node_modules/appmetrics/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/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Linux 4.15.0-66-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gandalf/access-watch/node_modules/appmetrics
gyp ERR! node -v v14.18.0
gyp ERR! node-gyp -v v8.2.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appmetrics#4.0.1 install: `node extract_all_binaries.js || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appmetrics#4.0.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! /home/gandalf/.npm/_logs/2021-10-11T13_41_15_454Z-debug.log
And here's the full thing: https://pastebin.com/cYsHa1EP
I know node-gyp must be installed and it is:
$ node-gyp --version
v8.2.0
I found an issue in appmetric's github and ran with CC=gcc-9 but to no success.
Thanks!

Related

Sharp returning errors on npm install for M1 Big Sur

I'm trying to install sharp for my project. When running npm i and npm install sharp, I am receiving the same errors about sharp (shown below). I've tried installing libvip globally and locally, and read about every thread about this issue and cannot seem to find the right solution. Any suggestions are welcome.
rosetta error: /var/db/oah/223263137464320_223263137464320/e6ddd63cd8fd3b7ef226e2cad9a1bead9d7f41f60d7ece6edd0cdcc0c33c97c6/libxcrun.dylib.aot: attachment of code signature supplement failed: 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: null
gyp ERR! stack at ChildProcess.onExit (/Users/elektra.murphy/.nvm/versions/node/v11.11.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/Users/elektra.murphy/.nvm/versions/node/v11.11.0/bin/node" "/Users/elektra.murphy/.nvm/versions/node/v11.11.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/elektra.murphy/Desktop/Projects/node_modules/sharp
gyp ERR! node -v v11.11.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Users/elektra.murphy/Desktop/Projects/package.json'
npm WARN No description
npm WARN No repository field.
npm WARN No README data
npm WARN No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp#0.23.2 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp#0.23.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! /Users/elektra.murphy/.npm/_logs/2021-10-12T08_24_48_579Z-debug.log
Found a solution for this in the Sharp docs: When using npm v6 or earlier, the npm install --unsafe-perm flag must be used when installing as root or a sudo user. Seems to have worked - now on to the next error!
Find more here on M1 installations:
https://sharp.pixelplumbing.com/install

Gatsby failing to install with Starter. Build error

Hi I would like to use a gatsby starter for a blog site. However when I use the command gatbsy new [name-of-project] [url-of-starter]
It shows these errors.
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/sharp/src/common.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:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/david/Desktop/blog/node_modules/sharp
gyp ERR! node -v v12.8.1
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp#0.21.3 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp#0.21.3 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:
ERROR
Command failed with exit code 1 (EPERM): npm install
Error: Command failed with exit code 1 (EPERM): npm install
- error.js:58 makeError
[lib]/[gatsby-cli]/[execa]/lib/error.js:58:11
- index.js:112 handlePromise
[lib]/[gatsby-cli]/[execa]/index.js:112:26
- task_queues.js:85 processTicksAndRejections
internal/process/task_queues.js:85:5
I have tried uninstalling gatsby cli, yarn and npm to no prevail.
Thanks for any advice.
And the default starter works fine its when I use a starter thats the issue.

hiredis install rebuild fail

I'm trying to install hiredis through npm on a mac and I am getting this error. I know there are some possible duplicates of this but I've tried other solutions and they have not worked for me. Here is the log:
11 warnings and 17 errors generated.
make: *** [Release/obj.target/hiredis/src/hiredis.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:258:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Aric/myApp/node_modules/hiredis
gyp ERR! node -v v6.10.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hiredis#0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hiredis#0.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Maybe not the correct way to fix my problem but I upgraded hiredis to v0.5.0 from v0.3.0 and it solved the issue for me.

Error while trying to install ursa with npm

I have this error when i try to install ursa (RSA public/private key OpenSSL bindings for node and io.js)
gyp: Call to 'node -e "require('nan')"' returned exit status 1. 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 (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.19.0-39-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/saad/Bureau/kevinIdP/node_modules/ursa
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! weird error 1
npm ERR! not ok code 0
Do i have to add some dependencies ?
Thanks for the interest

Not able to install bcrypt

aakanksha#aakanksha:~/Documents/shoutbox/node_modules$ sudo npm install bcrypt
> bcrypt#0.8.1 install / /home/aakanksha/Documents/shoutbox/node_modules/bcrypt
> node-gyp rebuild
make: Entering directory ` /home/aakanksha/Documents/shoutbox/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
make: g++: Command not found
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 127
make: Leaving directory `/home/aakanksha/Documents/shoutbox/node_modules/bcrypt/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:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.13.0-44-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node- gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/aakanksha/Documents/shoutbox/node_modules/bcrypt
gyp ERR! node -v v0.10.36
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Linux 3.13.0-44-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "bcrypt"
npm ERR! node v0.10.36
npm ERR! npm v2.6.0
npm ERR! code ELIFECYCLE
npm ERR! bcrypt#0.8.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.8.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/aakanksha/Documents/shoutbox/node_modules/npm- debug.log
I am getting this error while installing bcrypt.I have tried following things:
npm install -g npm
sudo npm i -g node-gyp && node-gyp clean
But even after running above commands,if i agin install bcrypt it gives me error.