为什么我不能安装googleapis?

时间:2016-04-23 18:15:26

标签: node.js git npm-install

我尝试通过npm install googleapis安装googleapis,但出了点问题。

错误堆栈:

npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit     at F (C:\Program Files\nodejs\node_modules\npm\node_mo
dules\which\which.js:73:28)
npm WARN addRemoteGit     at E (C:\Program Files\nodejs\node_modules\npm\node_mo
dules\which\which.js:76:29)
npm WARN addRemoteGit     at C:\Program Files\nodejs\node_modules\npm\node_modul
es\which\which.js:84:16
npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:82:15)
npm WARN addRemoteGit  git+https://github.com/rynomad/jsbn.git resetting remote
C:\Users\Valentine11\AppData\Roaming\npm-cache\_git-remotes\https-github-com-ryn
omad-jsbn-git-fe54fe73 because of error: { [Error: not found: git] code: 'ENOGIT
' }
npm ERR! git clone --template=C:\Users\Valentine11\AppData\Roaming\npm-cache\_gi
t-remotes\_templates --mirror https://github.com/rynomad/jsbn.git C:\Users\Valen
tine11\AppData\Roaming\npm-cache\_git-remotes\https-github-com-rynomad-jsbn-git-
fe54fe73: undefined
npm ERR! git clone --template=C:\Users\Valentine11\AppData\Roaming\npm-cache\_gi
t-remotes\_templates --mirror https://github.com/rynomad/jsbn.git C:\Users\Valen
tine11\AppData\Roaming\npm-cache\_git-remotes\https-github-com-rynomad-jsbn-git-
fe54fe73: undefined
npm WARN optional dep failed, continuing ecc-jsbn@0.0.1
googleapis@5.2.1 node_modules\googleapis
├── async@1.5.2
├── string-template@1.0.0
├── url@0.11.0 (punycode@1.3.2, querystring@0.2.0)
├── gapitoken@0.1.5 (jws@3.0.0)
├── request@2.72.0 (aws-sign2@0.6.0, forever-agent@0.6.1, tunnel-agent@0.4.2, oa
uth-sign@0.8.1, is-typedarray@1.0.0, caseless@0.11.0, stringstream@0.0.5, isstre
am@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, form-data@1.0.0-rc4, tough-co
okie@2.2.2, node-uuid@1.4.7, qs@6.1.0, combined-stream@1.0.5, mime-types@2.1.10,
 aws4@1.3.2, hawk@3.1.3, bl@1.1.2, http-signature@1.1.1, har-validator@2.0.6)
└── google-auth-library@0.9.7 (lodash.noop@3.0.1, async@1.4.2, string-template@0
.2.1, jws@3.0.0, request@2.60.0, gtoken@1.2.0)

我已经安装了一些包,一切都是正确的。我究竟做错了什么? 我有Git(和Git Extension)。

1 个答案:

答案 0 :(得分:0)

你需要在正在执行npm命令的环境中的PATH上使用Git二进制文件(console,bash等)。您可以在这篇文章中找到答案:On Gitbash - Bower : ENOGIT git is not installed or not in the PATH