【发布时间】:2020-03-26 07:07:22
【问题描述】:
npm install expo-cli --global
我收到以下错误:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! envsub@3.1.0 postinstall: `test -d .git && cp gitHookPrePush.sh .git/hooks/pre-push || true`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the envsub@3.1.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\User\AppData\Roaming\npm-cache\_logs\2019-12-01T12_11_45_118Z-debug.log
node 和 npm 版本:
node --version
v12.13.1
npm --version
6.12.1
我正在尝试在 Windows 10 上安装 expo-cli,根据它的官方网站:
npm install expo-cli --global 我收到以下错误:
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" "install" "expo-cli" "--global"
43058 详细节点 v12.13.1
43059 详细的 npm v6.12.1
43060 错误代码 ELIFECYCLE
43061 错误 errno 1
43062 错误 envsub@3.1.0 安装后:test -d .git && cp gitHookPrePush.sh .git/hooks/pre-push || true
43062 错误 退出状态 1
43063 错误 envsub@3.1.0 安装后脚本失败。
43063 错误 这可能不是 npm 的问题。上面可能有额外的日志输出。
43064 详细退出 [1,真]
我使用的是python版本:
python--版本 Python 3.8.0 以及 node 和 npm 版本:
节点--版本 v12.13.1
npm --version 6.12.1 ** 你有什么建议?
**
【问题讨论】:
-
我遇到了同样的问题,而不是在 windows 10 的命令提示符下运行命令,而是按照@JaskaranSingh 的回答建议尝试使用 Git bash