执行 cnpm run dev 运行小程序的时候
出现 了这样的一个报错
D:\>cnpm run dev:weapp
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\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\wangting\AppData\Roaming\npm-cache\_logs\2020-12-10T06_44_23_552Z-debug.log
一开始还以为自己是遇到了什么坑
仔细一看 有点哭笑不得 我可真的是一个粗心的小笨蛋呐 都没有进入项目 我在d盘执行命令 不报错才怪。。
于是赶紧cd进入自己新建的项目里面 在执行命令 这样才可以了
只要我改的快,就没有人发现就没有人会笑我~
又可以一本正经的继续写代码了