npm unable to install scrypt. node-gyp rebuild

Viewed 14805

I want to run a blockchain application, but I got this error.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt@6.0.3 install script.
npm ERR! This is probably not a problem with npm.

There is likely additional logging output above.

I have tried deleting node_modules, npm cache verify and npm install again. I have uninstalled and reinstalled npm and nodejs. My npm version is 6.12.0 and node version v12.13.0

4 Answers

Believe or not, use: sudo npm ... It worked for me

I know this is an old one, but for anyone hung on this one now, what solved this for me was downgrading to node v10.24.1 & npm v6.14.12. Seems to be an issue with newer node versions.

sudo apt-get update -y
sudo apt-get remove -y gyp
sudo apt-get install -y curl bzip2 build-essential g++ python3 git make gcc gcc-multilib node-gyp
sudo apt-get install -y pkg-config xserver-xorg-dev libxext-dev pkg-config libxi-dev libglu1-mesa-dev libglew-dev
sudo npm install prebuild-install node-pre-gyp node-gyp -g

if show already exist then use --force flag while installing npm package

if then also not solve then try install package using "sudo npm i "

for more information see https://github.com/zodern/meteor-up/issues/683

Related