我正在进行npm安装,并得到以下错误:
npm ERR! git rev-list -n1 8d27c06c2903538cd740a80edeae548922d057a5: fatal: bad object 8d27c06c2903538cd740a80edeae548922d057a5
npm ERR! git rev-list -n1 8d27c06c2903538cd740a80edeae548922d057a5:
npm ERR! git rev-list -n1 e92ca1c26c338ab641e70089cf8f57c140f39207: fatal: bad object e92ca1c26c338ab641e70089cf8f57c140f39207
npm ERR! git rev-list -n1 e92ca1c26c338ab641e70089cf8f57c140f39207:
npm ERR! git rev-list -n1 d90b1e34c799bf61cd1aafdc33db0a554fa9e617: fatal: bad object d90b1e34c799bf61cd1aafdc33db0a554fa9e617
npm ERR! git rev-list -n1 d90b1e34c799bf61cd1aafdc33db0a554fa9e617:
npm ERR! git rev-list -n1 f7f5bd678b80ec90c8d5c38c106f27466701fb2b: fatal: bad object f7f5bd678b80ec90c8d5c38c106f27466701fb2b
npm ERR! git rev-list -n1 f7f5bd678b80ec90c8d5c38c106f27466701fb2b:
npm ERR! git rev-list -n1 b7125954deccc8d802444effc02253b8729964a1: fatal: bad object b7125954deccc8d802444effc02253b8729964a1
npm ERR! git rev-list -n1 b7125954deccc8d802444effc02253b8729964a1:
npm ERR! git rev-list -n1 db701e170ba4cb11af3bac09411296cdb0e8215a: fatal: bad object db701e170ba4cb11af3bac09411296cdb0e8215a
npm ERR! git rev-list -n1 db701e170ba4cb11af3bac09411296cdb0e8215a:
npm ERR! git rev-list -n1 997ea0caad31d523b95cf64d03e28608561a36a6: fatal: bad object 997ea0caad31d523b95cf64d03e28608561a36a6
npm ERR! git rev-list -n1 997ea0caad31d523b95cf64d03e28608561a36a6:
npm ERR! git rev-list -n1 ea5466317ab75de6f46b0b39bae7a29c2aa18d68: fatal: bad object ea5466317ab75de6f46b0b39bae7a29c2aa18d68
npm ERR! git rev-list -n1 ea5466317ab75de6f46b0b39bae7a29c2aa18d68:
npm ERR! git rev-list -n1 2bebf3223b7b9ab00a18e294a52bcfffbbe066b7: fatal: bad object 2bebf3223b7b9ab00a18e294a52bcfffbbe066b7
npm ERR! git rev-list -n1 2bebf3223b7b9ab00a18e294a52bcfffbbe066b7:
npm ERR! git rev-list -n1 2dac046de6abc4c4f16ac25133c38cfe49a7368d: fatal: bad object 2dac046de6abc4c4f16ac25133c38cfe49a7368d
npm ERR! git rev-list -n1 2dac046de6abc4c4f16ac25133c38cfe49a7368d:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v5.6.0
npm ERR! npm v3.6.0
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true rev-list -n1 8d27c06c2903538cd740a80edeae548922d057a5
npm ERR! fatal: bad object 8d27c06c2903538cd740a80edeae548922d057a5
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>我在googled中搜索了这个问题,在git配置文件中添加了longPath true,它看起来如下
[credential]
helper = manager
[remote "origin"]
url = git@github.com:xxxx/xxxx-xx
[core]
longpaths = true我的Package.json是
{
"name": "xxxx-xx",
"version": "0.0.1",
"main": "app.js",
"browserify": {
"transform": [
"html2js-browserify"
]
},
"scripts": {
"postinstall": "gulp hook"
},
"dependencies": {
"angular": "1.3.15",
"angular-animate": "1.3.15",
"angular-aria": "1.3.15",
"angular-cookies": "1.3.15",
"angular-dynamic-locale": "git+ssh://github.com/xxxx/angular-dynamic-locale",
"angular-file-upload": "git+ssh://git@github.com/xxxx/angular-file-upload.git#v1.1.5",
"angular-growl-v2": "git+ssh://git@github.com/xxxxx/angular-growl-2.git#0.7.4",
"angular-i18n": "1.3.15",
"angular-messages": "1.3.15",
"angular-sanitize": "1.3.15",
"angular-touch": "1.3.15",
"angular-translate": "2.7.0",
"angular-ui-bootstrap": "0.14.3",
"angular-ui-router": "0.2.15",
"backstopjs": "^1.2.1",
"d3": "3.5.6",
"d3.chart": "git+ssh://git@github.com/xxx/xxx-d3.chart.git",
"gulp": "^3.9.0",
"html-minifier": "^3.0.2",
"html2js-browserify": "0.0.2",
"intro.js": "git+ssh://git@github.com/xxxx/intro.js.git#v1.0.0",
"lodash": "3.10.1",
"moment": "^2.11.1",
"moment-timezone": "^0.5.0",
"ng-storage": "0.3.1",
"ng-file-upload": "12.2.12",
"omniture": "git+ssh://git@github.com/xxxx/xxxx-omniture.git",
"ui-select": "git+ssh://git@github.com/xxxx/xxxx-ui-select.git"
},
"optionalDependencies": [
"utf-8-validate",
"bufferutil",
"fsevents"
]
}我的研究发现,
npm install。但这些都不适合我。我是不是漏掉了什么。提前谢谢。
发布于 2019-01-15 23:56:07
我已经遇到过几次这个问题,它似乎源于一个糟糕的或损坏的npm-收缩包装. from文件。重命名或删除该文件,然后再次运行npm安装。
发布于 2017-05-30 17:07:33
我也在和这个做斗争。我尝试了我能想到的一切,包括更新节点和npm,尝试在我的gitconfig文件中设置longpath = true (它已经设置了)。
通过更新git,我终于能够修复这个问题了。我在2.8.2上,我把它更新到了2.13.0,一切又开始工作了。我猜在后来的版本中有一个bug被修复了。
https://stackoverflow.com/questions/41935791
复制相似问题