问题描述
创建完react项目后使用npm start运行发现报错
PS D:\learning\react_learning\react_first> npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\learning\react_learning\react_first\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\learning\react_learning\react_first\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
原因分析:
没有进入项目所在文件夹my-app,而是停留在外层文件夹了!!!!!
文件目录如下,可以看到上面只停留在react_first目录
解决方案:
进入my-app文件夹再npm start