Node.js   发布时间:2022-04-24  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了node.js – MS Windows 10:错误:命令失败:git -c core.longpaths = true config –get remote.origin.url大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试在 Windows机器上使用Npm i安装我的项目依赖项.但是我登陆了这个错误

npm WARN addRemoteGit Error: Command Failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:202:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:850:16)
npm WARN addRemoteGit     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
npm WARN addRemoteGit  git+https://5345345erg345eg34eg:x-oauth-basic@github.com/test/test.git resetTing remote C:\Users\Administrator\ApPDAta\roaR_779_11845@ing\npm-cache\_git-remotes\git-https-test-89f19adf because of error: { Error: Command Failed: git -c core.longpaths=true config --get remote.origin.url
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! node v6.2.0
npm ERR! npm  v3.8.9
npm ERR! code 128
npm ERR! fatal: bad object 1cf23bc52c0a3b1b5dde89949ff9f820522e0367
npm ERR! fatal: remote did not send all necessary objects

做了一些研究,发现这个问题与不支持长度超过260个字符的文件和目录的窗口有关.我得到的解决方法是使用此命令来允许长路径文件名:

git config core.longpaths true

但这似乎并没有起作用.任何人都可以建议一个解决方法,为什么会发生这种情况?

节点和NPM版本:
节点:v6.2.0
NPM:3.8.9

如果我需要提供更多详细信息,请告诉我们?

解决方法

你必须更新你的npm.在更新到npm 5之前我遇到了这个问题.

大佬总结

以上是大佬教程为你收集整理的node.js – MS Windows 10:错误:命令失败:git -c core.longpaths = true config –get remote.origin.url全部内容,希望文章能够帮你解决node.js – MS Windows 10:错误:命令失败:git -c core.longpaths = true config –get remote.origin.url所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。