npm unable to install scrypt. node-gyp rebuild
Asked Answered
K

4

6

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

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

Kaleykaleyard answered 26/10, 2019 at 15:47 Comment(1)
I found this issue on Github. You can see the discussion and a response for a Linux system as well: github.com/ethereum/web3.js/issues/1066#issuecomment-438114907Davilman
P
3

https://github.com/ethereum/web3.js/issues/1066#issuecomment-338841841

From this link:

I've solved this using the following steps

npm install --global --production windows-build-tools
node-gyp configure --msvs_version=2015
npm config set python /path/to/executable/python2.7
npm install web3 --save

And also, I think that you can follow steps to fix node-gyp:

https://github.com/nodejs/node-gyp

Polacca answered 26/10, 2019 at 15:50 Comment(2)
SO should I do linux-build-tools if I am running this on linux?Davilman
@Geek I'm not sure about that. You should try. Who knows, It may work.Polacca
R
0

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

Rosyrot answered 23/5, 2020 at 12:44 Comment(0)
R
0

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.

Rouen answered 4/9, 2021 at 15:50 Comment(0)
K
0
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

Killer answered 18/7, 2022 at 19:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.