在使用npm install安装依赖时报错

Error while executing: npm ERR! D:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/ad

如何解决呢

我们需要设置git环境
git config --global url."https://".insteadOf git://
然后重新运行 npm install就行或者npm install --registry=https://registry.npm.taobao.org使用淘宝镜像
————————————————
版权声明:本文为CSDN博主「jiutainguixiao」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/nyasm/article/details/113742960

个人项目报错已解决
git上下载项目报错

npm ERR! code 128
npm ERR! Command failed: git clone --mirror -q

git://github.com/adobe-webplatform/eve.git C:\Users

\Administrator\AppData\Roaming\npm-cache\_cacache\tmp

\git-clone-1bbb02a0\.git --config core.longpaths=true
npm ERR! warning: templates not found in C:\Users

\ADMINI~1\AppData\Local\Temp\pacote-git-template-tmp

\git-clone-98f48c7a
npm ERR! fatal: read error: Invalid argument
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming

\npm-cache\_logs\2020-06-09T09_33_41_947Z-debug.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
在百度上搜索git config --global http.sslverify "false"
不起作用就试了这个git config --global url."https://".insteadOf git:// 发现可以了,但是上面问题解决了,但是又爆出这样的问题,继续

npm ERR! code EPERM
npm ERR! syscall lstat
npm ERR! path E:\项目\vue-element-admin\node_modules

\.staging\echarts-0c07e6f6\dist\echarts-en.js.map
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, lstat

'E:\项目\vue-element-admin\node_modules\.staging

\echarts-0c07e6f6\dist\echarts-en.js.map'
npm ERR! [OperationalError: EPERM: operation not

permitted, lstat 'E:\项目\vue-element-admin

\node_modules\.staging\echarts-0c07e6f6\dist\echarts-

en.js.map'] {
npm ERR! cause: [Error: EPERM: operation not

permitted, lstat 'E:\项目\vue-element-admin

\node_modules\.staging\echarts-0c07e6f6\dist\echarts-

en.js.map'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path: 'E:\\项目\\vue-element-admin\

\node_modules\\.staging\\echarts-0c07e6f6\\dist\

\echarts-en.js.map'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path: 'E:\\项目\\vue-element-admin\

\node_modules\\.staging\\echarts-0c07e6f6\\dist\

\echarts-en.js.map',
npm ERR! parent: 'vue-element-admin'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating

system.
npm ERR! It's possible that the file was already in use

(by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions

issue, please double-check the
npm ERR! permissions of the file and its containing

directories, or try running
npm ERR! the command again as root/Administrator.
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\lib\is-core.js'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\lib\node-modules-paths.js'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\lib\normalize-options.js'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\baz\quux.js'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\example\sync.js'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\lib\sync.js'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\nested_symlinks\mylib

\sync.js'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\lib\core.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\multirepo\lerna.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\baz\package.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\browser_field

\package.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\dot_main\package.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\dot_slash_main

\package.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\incorrect_main

\package.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\multirepo\package.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\multirepo\packages

\package-a\package.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\multirepo\packages

\package-b\package.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\nested_symlinks\mylib

\package.json'
npm WARN tar ENOENT: no such file or directory, open

'E:\项目\vue-element-admin\node_modules\.staging

\resolve-52df6e10\test\resolver\symlinked\package

\package.json'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming

\npm-cache\_logs\2020-06-09T09_43_16_093Z-debug.log

说是要升级npm,升级之后又出现以下的问题
npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path E:\项目\vue-element-admin\node_modules

\.staging\echarts-0c07e6f6\dist\echarts.common.js
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink

'E:\项目\vue-element-admin\node_modules\.staging

\echarts-0c07e6f6\dist\echarts.common.js'
npm ERR! [OperationalError: EPERM: operation not

permitted, unlink 'E:\项目\vue-element-admin

\node_modules\.staging\echarts-0c07e6f6\dist

\echarts.common.js'] {
npm ERR! cause: [Error: EPERM: operation not

permitted, unlink 'E:\项目\vue-element-admin

\node_modules\.staging\echarts-0c07e6f6\dist

\echarts.common.js'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'E:\\项目\\vue-element-admin\

\node_modules\\.staging\\echarts-0c07e6f6\\dist\

\echarts.common.js'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'E:\\项目\\vue-element-admin\

\node_modules\\.staging\\echarts-0c07e6f6\\dist\

\echarts.common.js',
npm ERR! parent: 'vue-element-admin'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating

system.
npm ERR! It's possible that the file was already in use

(by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions

issue, please double-check the
npm ERR! permissions of the file and its containing

directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming

\npm-cache\_logs\2020-06-10T00_08_46_799Z-debug.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
之后又看到说需要删除npmrc文件。

强调:不是nodejs安装目录npm模块下的那个npmrc文件

而是在C:\Users{账户}\下的.npmrc文件…
或者直接用命令清理就行,控制台输入:

npm cache clean --force
1
个人把这两个都执行了一下
完美问题解决!!!
————————————————
版权声明:本文为CSDN博主「weixin_46716934」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_46716934/article/details/106660110

标签智能推荐:

关于GIT合并出错的记录

今天给美术解决GIT资源冲突时碰到的问题,搞了挺长时间终于解决了。参看下面这个网址:http://www.bujichong.com/m/68今天git一小部分代码发现出错了,上网查了一下,大体情况清楚了,大概是在家里git提交过代码2个问题:1,本地未更新2,我github我建立了多个项目,目录路径不一致,直接提交 origin会有问题登录github,把对应的url地址复制到提交地址

GitHub国内加速- 加入gitclone.com

原:gitclonehttps://github.com/jinzhu/inflection.git新:gitclonehttps://gitclone.com/github.com/jinzhu/inflection.git

git 备忘录

[difftool"bc4"]cmd="\"D:\\soft\\BeyondCompare4\\BCompare.exe\"\"$LOCAL\"\"$REMOTE\""[merge]tool=bc4[mergetool"bc4"]cmd="\"D:\\soft\\BeyondCompare4\\BCompare.exe\"\"$LOCAL\"\"$REMOTE\""注意其中BeyondCompar

使用自建Git服务器管理私有项目 Centos 7.3 + Git 2.11.0 + gitosis (实测 笔记)

]#gitclonegit://github.com/res0nat0r/gitosis.git[root@tCentos7~]#cdgitosis[root@tCentos7~]#pythonsetup.pyinstall显示Finishedprocessingdependenciesforgitosis==0.2即表示成功4.GIT服务管理工具设置4.1打开GIT网址https://www.g

git可视化】git可视化工具

git工具下载地址:https://www.gitkraken.com/git工具git上的地址: https://github.com/5cr1pt/GitCracken

CVE-2020-27955复现

(Git-LFSRCE)0x00简介GitLFS是Github开发的一个Git的扩展,用于实现Git对大文件的支持0x01影响版本Git-LFS(git-lfs)<=2.12一些受影响的产品包括Git,GitHubCLI,GitHubDesktop,VisualStudio,GitKraden,SmartGit,Sourcetree等该漏洞影响仅windows平台0x02复现过程环境搭建​下

设计模式代码地址

设计模式代码地址:<git@github.com:houyuanbin/houyuanbin.github.io.git>

[.git]从远程库克隆

1、定位文件夹cd/D/GitHub/2、克隆远程库gitclonegit@github.com:electronicarts/CnC_Remastered_Collection.git

Git从入门到熟练使用

加一个新的远程Git仓库$gitremoteorigin$gitremoteaddtesthttps://github.com/lanyasheng/NTAlgorithm.git$gitremote-voriginhttps://git.ms.netease.com/netease-precious-metals-client/ios-client.git(fetch)originhttps:/

rror while executing: npm ERR! D:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/ad

在使用npminstall安装依赖时报错Errorwhileexecuting:npmERR!D:\ProgramFiles\Git\cmd\git.EXEls-remote-h-tgit://github.com/ad如何解决呢我们需要设置git环境gitconfig--globalurl."https://".insteadOfgit://然后重新运行npminstall就行或者npminst