【node】 npm install 报错:code 128

简介: 【node】 npm install 报错:code 128

前言

今天上班后端跟我说,她没事的时候在网上找了两个开源项目没跑起来让我帮忙看看(项目一)…(此处省略1000字)…。拿到项目后第一时间找package.jsonreadme.md。emmm…serve命令和npm,搜嘎npm run serve嘛,简单!欸?怎么报错?

npm ERR! code 128
npm ERR! An unknown git error occurred
PS D:\HT-Code\vue-element-admin> npm install 
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/nhn/raphael.git
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\test\AppData\Local\npm-cache\_logs\2021-11-07T04_40_27_971Z-debug.log

一脸懵逼,赶紧找度娘

分析

我认为问题出现在这里

npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/nhn/raphael.git

估摸着是没有连接远程仓库配置ssh吧

解决

在百度谷歌查了,很多重复的都是执行这两行命令

git config --global http.sslverify "false"
git config --global url."https://".insteadOf git://

然后跟着cv放到Vscode控制台执行,后续再执行npm install居然没有报错了。。神奇


下班~

目录
相关文章
9-14|npm install --global windows-build-tools 安装太慢了,能够指定国内源
9-14|npm install --global windows-build-tools 安装太慢了,能够指定国内源
|
9天前
|
缓存 JavaScript 前端开发
8种方法解决vue创建项目报错:command failed: npm install --loglevel error
该文章提供了八种解决Vue项目创建时遇到的`command failed: npm install --loglevel error`错误的方法,包括清理缓存、更换npm源、重新安装Node.js等措施。
8种方法解决vue创建项目报错:command failed: npm install --loglevel error
|
2月前
optional install error: Error: Unsupported URL Type: npm:vue-loader@^16.1.0
optional install error: Error: Unsupported URL Type: npm:vue-loader@^16.1.0
34 3
|
3月前
|
运维 Kubernetes Java
阿里云云效操作报错合集之npm包已经发布到了制品仓库,但流水线中拉取依赖时出现404错误,该如何排查
本合集将整理呈现用户在使用过程中遇到的报错及其对应的解决办法,包括但不限于账户权限设置错误、项目配置不正确、代码提交冲突、构建任务执行失败、测试环境异常、需求流转阻塞等问题。阿里云云效是一站式企业级研发协同和DevOps平台,为企业提供从需求规划、开发、测试、发布到运维、运营的全流程端到端服务和工具支撑,致力于提升企业的研发效能和创新能力。
阿里云云效操作报错合集之npm包已经发布到了制品仓库,但流水线中拉取依赖时出现404错误,该如何排查
|
2月前
|
JavaScript
【Deepin 20系统】Jupyter notebook解决ValueError: Please install Node.js and npm before continuing installa
文章讨论了在Deepin 20系统上安装Jupyter Notebook的debug插件时出现的"ValueError: Please install Node.js and npm before continuing installation"错误,并提供了使用conda安装Node.js的解决方法。
83 1
|
2月前
|
JavaScript
【Azure Function App】Nodejs Function遇见WorkerProcessExitException : node exited with code -1073740791 (0xC0000409) 错误
【Azure Function App】Nodejs Function遇见WorkerProcessExitException : node exited with code -1073740791 (0xC0000409) 错误
|
2月前
NPM——Electron failed to install correctly, please delete node_modules/electron and try
NPM——Electron failed to install correctly, please delete node_modules/electron and try
134 0
|
2月前
|
开发工具 git
IDEA——npm install 没有生成node_modules目录
IDEA——npm install 没有生成node_modules目录
136 0
|
2月前
|
JavaScript Linux
【Deepin 20系统】解决ValueError: Please install nodejs >=12.0.0 before continuing
文章讨论了在尝试安装JupyterLab的debugger扩展时遇到的"ValueError: Please install nodejs >=12.0.0 before continuing"错误。由于使用conda和其他包管理器安装的Node.js版本只有10.x,作者提供了从Node.js官网直接下载并安装一个更新版本(至少12.0.0)的解决方法,包括下载对应系统版本的Node.js,解压,并建立软链接以更新版本。
35 0

推荐镜像

更多
下一篇
无影云桌面