node-gyp error when running npm install - node.js

I'm new to node and a bit out of my depth here. Experiencing this error on both Mac OS X and Centos 6. Happens in all the npm install xxx commands I've tried. Any suggestions on how to get around this error much appreciated.
Similar to npm install gives node-gyp error but I do not have spaces in my username which is what solved his issue.
npm install canvas
> canvas#1.6.6 install /home/test1/ng2-webpack-demo/node_modules/canvas
> node-gyp rebuild
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
gyp: Call to './util/has_lib.sh freetype' returned exit status 0 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
(/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
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 Linux 2.6.32-642.4.2.el6.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-
gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/test1/ng2-webpack-demo/node_modules/canvas
gyp ERR! node -v v6.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN #angular/animations#4.3.6 requires a peer of #angular/core#4.3.6 but
none was installed.
npm WARN #angular/material#2.0.0-beta.8 requires a peer of #angular/cdk#2.0.0-
beta.8 but none was installed.
npm WARN #angular/material#2.0.0-beta.8 requires a peer of
#angular/core#^4.0.0 but none was installed.
npm WARN #angular/material#2.0.0-beta.8 requires a peer of
#angular/common#^4.0.0 but none was installed.
npm WARN #ngtools/webpack#1.2.10 requires a peer of #angular/tsc-
wrapped#^0.5.0 but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.2
(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current:
{"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas#1.6.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas#1.6.6 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/test1/.npm/_logs/2017-08-29T15_54_58_848Z-debug.log

This is a known canvas issue, probably caused by missing native libs.
Try this see if it helps:
sudo npm uninstall -g node-gyp
sudo npm install -g node-gyp
brew install pkg-config cairo libpng jpeg giflib
npm i canvas
Source: https://github.com/Automattic/node-canvas/issues/913#issuecomment-368042394

I've same error the reason was that I don't have clang compiler installed.
My solution to this was to install build-essential package
sudo apt-get install build-essential
I'm using Ubuntu 20.1 release

Related

getting an error when trying to load ODBC on Ubuntu

$ npm install odbc
odbc#2.2.2 install /home/user/project/node_modules/odbc
node-gyp configure build
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:167:21)
gyp ERR! System Linux 5.4.0-29-generic
gyp ERR! command "/home/user.nvm/versions/node/v12.16.3/bin/node" "/home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/user/GASC-RET/node_modules/odbc
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! odbc#2.2.2 install: node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the odbc#2.2.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! /home/user/.npm/_logs/2020-05-07T22_19_29_684Z-debug.log
****I ensured below command is executed first, although when I type unixodbc -v I don't get anything back..****
~$ sudo apt install unixodbc unixodbc-dev
Building dependency tree
Reading state information... Done
unixodbc-dev is already the newest version (2.3.6-0.1build1).
unixodbc is already the newest version (2.3.6-0.1build1).
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
***this is my first time configuring Ubuntu for my app and I'm sure I'm missing steps, but can't find a proper step by step online to follow*****
turns out I was missing Ubuntu-make (below snipped is from official site, explaining what "make" does. I was able to install it via sudo apt install build-essential; which installs "make" among other packages. I could have also gone with sudo apt install make.
https://wiki.ubuntu.com/ubuntu-make
Ubuntu Make is a command line tool which allows you to download the latest version of popular developer tools on your installation, installing it alongside all of the required dependencies (which will only ask for root access if you don't have all the required dependencies installed already), enable multi-arch on your system if you are on a 64 bit machine, integrate it with the Unity launcher. Basically, one command to get your system ready to develop with!

NPM node-sass installation fails

I am trying to install node-sass in a project, which perfectly builds and runs on my pc but on my surface I am having major issues when trying to install the packages.
Note: I have tryed reinstalling and rebuilding the project several times.
Summary of the error:
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Max-T\Documents\Sources\StaffMangerV2\black-dashboard-pro-react-v1.0.0\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Max-T\\Documents\\Sources\\StaffMangerV2\\black-dashboard-pro-react-v1.0.0\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Max-T\Documents\Sources\StaffMangerV2\black-dashboard-pro-react-v1.0.0\node_modules\node-sass
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.11.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.11.0 postinstall 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! C:\Users\Max-T\AppData\Roaming\npm-cache\_logs\2019-10-30T10_05_01_386Z-debug.log
package.json => https://hastebin.com/azetegukes.pl
too much coode so I had to paste it elsewhere.
You're using Node 12, and node-sass needs to be at least 4.12 to support that version https://github.com/sass/node-sass#node-version-support-policy
If anyone runs into this lately... the easiest fix is to replace node-sass with just sass in your dependencies. It's the more recently maintained version and I only had to change 1 line of code with how it's initialized and all of my existing code was already compatible.
There are more details at https://sass-lang.com/blog/libsass-is-deprecated under How to migrate.
try this command it works for me
sudo npm install -g --unsafe-perm node-sass
Don't use node-sass anymore
node-sass is deprecated. Instead use the new version which is sass.
You can uninstall the old and install the new one with this command
npm uninstall node-sass
npm install sass
After more than 2 hours of trying all sorts of ways (cleaning npm cache, deleting node_modules, trying to install with global switch -g, etc.) to install node-sass and failing every time, I finally changed the mirror to china and it immediately worked for me!! (I know it kinda doesn't make any sense, considering the error I was getting)
Just for reference, this was the error I was receiving before it finally worked:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.14.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.14.0 postinstall 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! C:\Users\****\AppData\Roaming\npm-cache\_logs\2020-06-06T13_56_56_768Z-debug.log
My Node version: v12.18.0
node-sass version in package.json: "^4.14.0"
I changed the mirror as stated in the node-sass npm page.
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
npm install node-sass
Hope that helps.
The best option would probably be to replace node-sass lib with sass one.
But in our case I fixed that by installing nvm and setting local node version to 14.17.6
My node-sass version is 4.14.1

npm install: Failed at the node-sass#3.13.1 postinstall script

I have a angular application: https://github.com/XBITSwitzerland/ngx-admin/tree/ng2-admin
And now I try to do: npm install
But I get this error (The compete Output of the command was way too long, so I just share here the last part):
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\github\ngx-admin\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\github\\ngx-admin\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\github\ngx-admin\node_modules\wintersmith-sassy\node_modules\node-sass
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN ngx-toastr#4.4.1 requires a peer of #angular/core#^2.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-toastr#4.4.1 requires a peer of #angular/common#^2.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.13.1 postinstall 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! C:\Users\danyb\AppData\Roaming\npm-cache\_logs\2019-01-29T18_25_12_699Z-debug.log
Does someone have an Idea why this error occurs and how to solve it?
If you run into this issue, read this page: https://www.bramvandenbulcke.be/en/kb/failed-node-sass3131-postinstall-script
The solution in my case:
1) Delete the package-lock.json file
2) npm install gulp-sass --save-dev
3) npm install node-sass#latest
Version specific notes:
node-sass#3.13.1 runs only on versions of Node.js up to v7 as stated in the release notes:
I think this is happening because you're missing the node-sass module. Try the following and rerun your build script and see if this resolves your issue:
npm install node-sass#latest
Also, I see you're using fsevents on a Windows platform, just a warning this module is only supported for Native access to OS X FSEvents
I had error node-sass#3.13.1 postinstall: node scripts/build.js on npm install after this message
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/linux-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/linux-x64-72_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> core-js#2.6.9 postinstall /var/www/my/armat/www/node_modules/core-js
> node scripts/postinstall || echo "ignore"
and spent hours to find solution. I was trying to install it on laravel 5.2 that uses older versions of node and npm this helped me
$ npm install -g n
$ n 6.10.2 // selecting version you need in my case 6.10.2
$ npm install -g npm#3.10.10 // same for npm
hope this will help somebody else ^_^
#######UPDATE###########
nvm install 6.10.2
nvm use 6.10.2
npm install -g npm#3.10.10
only delete
package-lock.json
file
and do npm install again
I also received the same error
"npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#3.13.1 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.13.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above."
Solution:
I increased node-sass and gulp-sass versions to latest in package.json file, then issue got fixed.
If you scroll further up in the error output and you see something like:
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
You can fix it on windows with the following steps:
delete node_modules folder
run npm install --global windows-build-toolsin powershell as admin
reinstalling node modules or node-sass with npm install
For me, problem was with the Linux directory permissions. Even with sudo and root user I couldn't make it work.
The solution to me was to change project directory owner as follows:
sudo chown my_user:my_user -R /path/to/project
Do the following commands respectively:
rm -rf package-lock.json
npm install node-sass#latest
For Ubuntu
Delete the package-lock.json file
sudo npm install gulp-sass --save-dev
sudo npm install node-sass#latest
If you use Visual Studio run following command:
npm cache clean --force
npm config set msvs_version 2019 --global
where 2019 is the version of Visual Studio
If you are using OpenBSD, that's because you need g++. Install it using
pkg_add g++
But, it gets installed as ec++, on /usr/local/bin, so you can copy, rename, or create a symlink to it using:
ln -s /usr/local/bin/ec++ /usr/local/bin/g++
Do the npm install again and it should work

Problem in installing npm install -g composer-cli in ubuntu 16.04

Hi I am trying to install composer-cli using npm
but it is throwing error.
the log of the error is as below:
18988 error code ELIFECYCLE
18989 error errno 1
18990 error grpc#1.10.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
18990 error Exit status 1
18991 error Failed at the grpc#1.10.1 install script.
18991 error This is probably not a problem with npm. There is likely additional logging output above.
18992 verbose exit [ 1, true ]
I tried every possible way to fix this issue. but couldn't find any solution.
Please let me know how to fix the issue.
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:240:12)
gyp ERR! System Linux 4.15.0-34-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" "--library=static_library" "--module=/home/dspl_user/.npm-global/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/dspl_user/.npm-global/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc"
gyp ERR! cwd /home/dspl_user/.npm-global/lib/node_modules/composer-cli/node_modules/grpc
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.10.1 install: `node-pre-gyp install --fallback-to-build --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! /home/dspl_user/.npm/_logs/2018-09-27T13_11_13_477Z-debug.log
i resolved the same problem on my Ubuntu 18.04 machine by =>
Installing pre-requisites at https://hyperledger.github.io/composer/latest/installing/installing-prereqs.html
which says->
curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
then
chmod u+x prereqs-ubuntu.sh
and at last =>
./prereqs-ubuntu.sh
then restart your terminal and try the installation =>
npm install -g composer-cli#0.20
without su or sudo. I hope this helps :):)
I think I had the same error as you. It's working for me now after switching to Node 8.9.0. It looks like you're using Node v10, which is not supported for hyperledger fabric.

"node-gyp rebuild" error in mac

I wanted to follow this page to run JSBin locally.
I just installed xcode 8.2 in my mac. Now, npm -v returns 3.10.9; node -v returns v7.2.1. However, npm install raised errors:
/Users/softtimur/Startup/WebProjects/jsbin$ npm install
> hashring#3.0.0 install /Users/softtimur/Startup/WebProjects/jsbin/node_modules/hashring
> node-gyp rebuild
CXX(target) Release/obj.target/hashvalue/src/hashvalue.o
In file included from ../src/hashvalue.cc:1:
../../nan/nan.h:189:68: error: too many arguments to function call, expected at most 2, have 4
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
...
...
...
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
13 warnings and 20 errors generated.
make: *** [Release/obj.target/hashvalue/src/hashvalue.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:276: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.1.0
gyp ERR! command "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/softtimur/Startup/WebProjects/jsbin/node_modules/hashring
gyp ERR! node -v v7.2.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN mocha-casperjs#0.5.8 requires a peer of casperjs#>= 1.1.0-beta3 but none was installed.
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.2.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! hashring#3.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hashring#3.0.0 install script 'node-gyp rebuild'.
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 hashring 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 information on how to open an issue for this project with:
npm ERR! npm bugs hashring
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls hashring
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/softtimur/Startup/WebProjects/jsbin/npm-debug.log
Does anyone know what's wrong here?
Downgrade Node to v10, like this:
brew uninstall node
brew install node#10
brew link --force --overwrite node#10
npm i should finish without errors now.
The problem is that hashring v3.0.0 depends on an older version of nan (v1.3.x), which is not compatible with recent versions of node. It should be noted that as of this writing, the current version of hashring (v3.2.0) no longer contains an addon, it's javascript only.
The hashring dependency comes from jsbin's memcached dependency, which is currently hard coded to a specific git commit hash. There was a PR to update this dependency a number of months ago but was apparently dismissed because the maintainer(s) are apparently not interested in supporting modern versions of node. You may want to create an issue on their tracker to voice your concern about node compatibility.

Resources