vue 项目npm install 报错 npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/sohee-lee7/Sq

npm install出错的解决办法

很多小伙伴可能跟我一样是个小白,还不知道怎么启动vue,然后就照着README一阵乱搞,然后npm install的时候就报了以下的错误,网上的解决办法也看不懂,我自己的解决办法来了

it <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.

我也不知道这是为什么会报这样的错误,但是我的解决办法是这样的:
不要直接在vscode的命令行中执行npm install,而是来到你项目所在的目录下,进入到.git这一文件夹下面,右键点击Git Bash Here,然后在这里输入npm install,就可以了,等待它install完成以后,就去启动你的vue,完成。如果不行的大,大家可以先执行 npm cache clean --force 清除缓存,然后再执行npm install即可。

  • 5
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

随便起的名字也被占用

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值