下载element-plus/icons报错
来源:3-7 构建登录页面 UI 结构
菜鸟轮回
2022-01-14
看到前边兄弟说要element-plus特定版本以后,用icon的话要下载。根据提示下载随即报错。不太明白的是报错信息是指我git不对啊还是我没有访问权限
下边是报错日志
0 verbose cli [
0 verbose cli ‘C:\Program Files\nodejs\node.exe’,
0 verbose cli ‘C:\Users\localhost\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js’,
0 verbose cli ‘install’,
0 verbose cli ‘–save’,
0 verbose cli 'element-plus/icons’
0 verbose cli ]
1 info using npm@8.3.0
2 info using node@v16.13.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Users\localhost\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:D:\daxt_ddm\imooc-admin.npmrc Completed in 1ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\localhost.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\localhost\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 10ms
19 timing npm:load:configload Completed in 10ms
20 timing npm:load:setTitle Completed in 1ms
21 timing config:load:flatten Completed in 3ms
22 timing npm:load:display Completed in 4ms
23 verbose logfile C:\Users\localhost\AppData\Local\npm-cache_logs\2022-01-13T16_19_04_061Z-debug-0.log
24 timing npm:load:logFile Completed in 6ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 22ms
28 timing arborist:ctor Completed in 1ms
29 silly logfile start cleaning logs, removing 1 files
30 timing idealTree:init Completed in 737ms
31 timing arborist:ctor Completed in 0ms
32 timing idealTree Completed in 343941ms
33 timing command:install Completed in 343957ms
34 verbose stack Error: An unknown git error occurred
34 verbose stack at makeError (C:\Users\localhost\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\git\lib\make-error.js:28:13)
34 verbose stack at C:\Users\localhost\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\git\lib\spawn.js:36:26
35 verbose cwd D:\daxt_ddm\imooc-admin
36 verbose Windows_NT 10.0.19042
37 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Users\localhost\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “install” “–save” "element-plus/icons"
38 verbose node v16.13.0
39 verbose npm v8.3.0
40 error code 128
41 error An unknown git error occurred
42 error command git --no-replace-objects ls-remote ssh://git@github.com/element-plus/icons.git
43 error git@github.com: Permission denied (publickey).
43 error fatal: Could not read from remote repository.
43 error
43 error Please make sure you have the correct access rights
43 error and the repository exists.
44 verbose exit 128
45 timing npm Completed in 344428ms
46 verbose unfinished npm timer reify 1642090744528
47 verbose unfinished npm timer reify:loadTrees 1642090744541
48 verbose unfinished npm timer idealTree:userRequests 1642090745278
49 verbose code 128
50 error A complete log of this run can be found in:
50 error C:\Users\localhost\AppData\Local\npm-cache_logs\2022-01-13T16_19_04_061Z-debug-0.log
希望老师帮忙看一下
1回答
-
Sunday
2022-01-14
你好
在element-plus的0.12.×版本中需要单独下载element-plus/icons
我看你的错误不像是这个依赖包缺少的错误。我建议你删除node_modules文件夹,查勘package.json中是否有icons这个依赖,没有就添加上。
然后重新执行npm i 下载所有依赖(注意不要使用cnpm)162022-01-21
相似问题