npm ERR code ENOENT npm ERR syscall open npm ERR path CUserspackage.jsonnpm ERR code ENOENT n

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:UsersMZSHDesktop时间同步网络系统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:UsersMZSHAppDataRoaming
pm-cache_logs2021-04-25T09_08_13_206Z-debug.log

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

你可能感兴趣的:(前端,html,npm,node.js,前端)