Mihai  Ghimciuc
Mihai Ghimciuc

Reputation: 131

code ELIFECYCLE error When installing expo-cli

npm install expo-cli --global

I got this following error:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `test -d .git && cp gitHookPrePush.sh .git/hooks/pre-push || true`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\User\AppData\Roaming\npm-cache\_logs\2019-12-01T12_11_45_118Z-debug.log

node and npm versions:

node --version
v12.13.1
npm --version
6.12.1

I am trying to install expo-cli on windows 10, according it's official site:

npm install expo-cli --global I got this following error:

43056 verbose Windows_NT 10.0.18362 43057 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "expo-cli" "--global" 43058 verbose node v12.13.1 43059 verbose npm v6.12.1 43060 error code ELIFECYCLE 43061 error errno 1 43062 error [email protected] postinstall: test -d .git && cp gitHookPrePush.sh .git/hooks/pre-push || true 43062 error Exit status 1 43063 error Failed at the [email protected] postinstall script. 43063 error This is probably not a problem with npm. There is likely additional logging output above. 43064 verbose exit [ 1, true ] I am using python version:

python --version Python 3.8.0 and node and npm versions:

node --version v12.13.1

npm --version 6.12.1 ** What is your suggestion?

**

Upvotes: 13

Views: 2808

Answers (2)

Jaskaran Singh
Jaskaran Singh

Reputation: 199

just try installing npm install expo-cli --global this command on git bash. It worked for me.

Upvotes: 19

Cyrus the Great
Cyrus the Great

Reputation: 5932

I fixed this problem :

1- Download and install Git SCM
2- Download Visual Studio Community HERE and install a Custom Installation, selecting ONLY the following packages: VISUAL C++, PYTHON TOOLS FOR VISUAL STUDIO and MICROSOFT WEB DEVELOPER TOOLS
3- Download and install Python 2.7.x
4- Register a Environment Variable with name: GYP_MSVS_VERSION with this value: 2015

After these installations i think this part is important:

postinstall script of envsub depends on built-in unix shell commands. So any shell compatible with unix shell should works, like Git BASH

So run npm install expo-cli --global after above installation on Git BASH

Upvotes: 1

Related Questions