在git上下载项目报错个人解决办法npm ERR! code 128 npm ERR! Command failed: git clone --mirror -q git://github.com

个人项目报错已解决
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

在百度上搜索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

之后又看到说需要删除npmrc文件。

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

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

npm cache clean --force

个人把这两个都执行了一下
完美问题解决!!!

你可能感兴趣的:(在git上下载项目报错个人解决办法npm ERR! code 128 npm ERR! Command failed: git clone --mirror -q git://github.com)