Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
658 views
in Technique[技术] by (71.8m points)

node.js - 安装expo-cli时出现代码ELIFECYCLE错误(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:UsersUserAppDataRoaming
pm-cache\_logs2019-12-01T12_11_45_118Z-debug.log

node and npm versions:

(节点和npm版本:)

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:

(根据其官方网站,我正在尝试在Windows 10上安装expo-cli:)

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

(npm install expo-cli --global我收到以下错误:)

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

(43056详细Windows_NT 10.0.18362 43057详细argv“ C:\ Program Files \ nodejs \ node.exe”“ C:\ Program Files \ nodejs \ node_modules \ npm \ bin \ npm-cli.js”“安装”“ expo-cli “” --global“ 43058详细节点v12.13.1 43059详细npm v6.12.1 43060错误代码ELIFECYCLE 43061错误errno 1 43062错误[email protected]安装后: test -d .git && cp gitHookPrePush.sh .git/hooks/pre-push || true)

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.

(test -d .git && cp gitHookPrePush.sh .git/hooks/pre-push || true 43062错误退出状态1 43063错误[email protected]安装后脚本失败。)

43063 error This is probably not a problem with npm.

(43063错误这可能不是npm的问题。)

There is likely additional logging output above.

(上面可能还有其他日志记录输出。)

43064 verbose exit [ 1, true ] I am using python version:

(43064详细出口[1,true]我正在使用python版本:)

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

(python --version Python 3.8.0以及node和npm版本:)

node --version v12.13.1

(节点-版本v12.13.1)

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

(npm --version 6.12.1 **您的建议是什么?)

**

(**)

  ask by Mihai Ghimciuc translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

just try installing npm install expo-cli --global this command on git bash.

(只需尝试在git bash上安装npm install expo-cli --global这个命令即可。)

It worked for me.

(它为我工作。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...