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,而是进入你项目所在的目录下,启动命令行窗口,然后在这里输入npm install,就可以了,等待它install完成以后,就去启动你的vue,完成。如果不行的大,大家可以先执行 npm cache clean --force 清除缓存,然后再执行npm install即可。
原文链接:vue 项目npm install 报错 npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/sohee-lee7/Sq