npm安装依赖错误

48 篇文章 3 订阅
npm ERR! code 128
npm ERR! git dep preparation failed
npm ERR! command C:Program Files
odejs
ode.exe C:UsersAdministratorAppDataRoaming
pm
ode_modules
pmin
pm-cli.js install --force --cache=C:UsersAdministratorAppDataLocal

pm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-ru
n
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 128
npm ERR! npm ERR! An unknown git error occurred
npm ERR! npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/adobe-webplatform/eve.git
npm ERR! npm ERR! git@github.com: Permission denied (publickey).
npm ERR! npm ERR! fatal: Could not read from remote repository.
npm ERR! npm ERR!
npm ERR! npm ERR! Please make sure you have the correct access rights
npm ERR! npm ERR! and the repository exists.
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     C:UsersAdministratorAppDataLocal
pm-cache_logs?1-09-02T01_57_04_188Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersAdministratorAppDataLocal
pm-cache_logs?1-09-02T01_59_44_422Z-debug.log

重新npm install

npm ERR! code 1
npm ERR! path E:NingXiaEducationPMSsrcclientepms-web
ode_modules
ode-sass
npm ERR! command failed

国内淘宝镜像
npm i -g cnpm --registry=https://registry.npm.taobao.org
cnpm install node-sass

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersLenovoAppDataRoaming
pm-cache_logs?0-02-18T05_24_41_971Z-debug.log

运行cmd命令:
npm install npm -g
查看npm版本:
npm -v
项目内:npm install

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
npm安装依赖包报错时,可能有多种原因导致。其中一种常见的错误是 "The package-lock.json file was created with an old version of npm"。这个错误提示说明package-lock.json文件是使用较旧的npm版本创建的。这可能是因为你在使用较新的npm版本时,使用了一个已经存在的package-lock.json文件。 为了解决这个问题,你可以尝试以下步骤: 1. 首先,你可以尝试删除已存在的package-lock.json文件和node_modules文件夹。你可以使用命令sudo rm -rf node_modules package-lock.json来删除它们。 2. 然后,你需要更新你的npm版本,以确保与package-lock.json文件兼容。你可以使用npm install -g npm命令来更新npm。更新完成后,重新运行npm install命令来安装依赖包。 这样,你应该能够成功安装依赖包并解决npm安装依赖包报错的问题。请记得在进行这些操作之前备份你的项目文件,以防意外情况发生。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [前端-工作中 npm install 安装依赖报错常见总结](https://blog.csdn.net/inthat/article/details/120564807)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值