项目场景:
启动新项目
问题描述
运行npm run serve报错
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\工作\个人\学习\G6 拖拉拽\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\工作\个人\学习\G6 拖拉拽\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
原因分析:
找不到package.json,因为此时没有在对应的demo目录下
解决方案:
找到demo目录再运行就好了