运行若依前端项目的时候遇到如下错误

运行

npm install --registry=https://registry.npmmirror.com

时报如下错误

 

E:\idea_workspace\study\ruoyi_project\RuoYi-Vue>npm install --registry=https://registry.npmmirror.com
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path E:\idea_workspace\study\ruoyi_project\RuoYi-Vue/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'E:\idea_workspace\study\ruoyi_project\RuoYi-Vue\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Program\nodejs\node_cache\_logs\2022-07-18T03_29_36_586Z-debug-0.log

原来是没有定位到vue项目的根目录

参考

(123条消息) npm errno-4058_倒霉的小白鼠的博客-CSDN博客_npm报错4058

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐