学无先后,达者为师

网站首页 前端文档 正文

npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\package.jsonnpm ERR! code ENOENT n

作者:sing__star 更新时间: 2022-01-11 前端文档

npm run dev时报错

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\...\Desktop\...系统\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\MZSH\Desktop\时间同步网络系统\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!     C:\Users\MZSH\AppData\Roaming\npm-cache\_logs\2021-04-25T09_08_13_206Z-debug.log

这是因为在压缩项目文件夹,然后在解压时多了一层与项目名称相同文件夹,所以你现在打开的是项目得上一级文件夹。
解决办法:从当前文件再进入,找到要打开得项目文件,重新编译即可。

原文链接:https://blog.csdn.net/qq_44774831/article/details/116133670

栏目分类
最近更新