首页 前端知识 解决:Could not read package.json: This is related to npm not being able to find a file.

解决:Could not read package.json: This is related to npm not being able to find a file.

2024-06-22 01:06:02 前端知识 前端哥 414 291 我要收藏

问题:

在这里插入图片描述
错误提示代码:

PS E:\BaiduNetdiskDownload\vue状态管理\vuex_start-学习版本> npm install
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path E:\BaiduNetdiskDownload\vue状态管理\vuex_start-学习版本\package.json
npm ERR! errno -4058
npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open 'E:\BaiduNetdiskDownload\vue状态管理\vuex_start-学习版本\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: E:\config_tools\nodejs\node_cache\_logs\2024-05-03T12_43_16_453Z-debug-0.log

原因:

Could not read package.json,找不到package.json的路径,执行npm命令的路径不正确

解决:

cd:到正确目录下即可,再执行npm install 命令
在这里插入图片描述

转载请注明出处或者链接地址:https://www.qianduange.cn//article/13232.html
标签
评论
发布的文章

jQuery 选择器

2024-05-12 00:05:34

Vue中public/assets目录区别

2024-07-02 23:07:29

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!