javascript - React Js:没有这样的文件或目录,打开 Package.json
问题描述
在运行 npm start 时,我收到错误 -
PS D:\React\operations_app_tut> npm start
npm ERR! path D:\React\operations_app_tut\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'D:\React\operations_app_tut\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\IT-DI\AppData\Roaming\npm-cache\_logs\2020-12-16T05_56_02_304Z-debug.log
在检查物理路径时确保文件存在 -
参考项目的结构 -
我参考了几个站点并再次运行 -npm install 但同样的错误仍然存在。
解决方案
您npm start
在不正确的文件夹中运行。还有为什么外面有 package-lock.json。
移动到D:\React\operations_app_tut\operations_app_tut
目录然后运行npm start
推荐阅读
- json - 将json对象的值传递给另一个对象
- c# - 有没有办法为 TextBox 实现 Redo() 函数?C#
- flutter - 评论框作为 Facebook 在颤动
- javascript - 如何管道搜索所有数据而不仅仅是名称?角
- apache-spark - 快速压缩的镶木地板文件出现意外的数据大小问题
- python - 标签 inset_axes 散点图
- intellij-idea - IntelliJ IDEA 未在新项目向导中显示 JavaFX
- python - 无论我尝试什么,我都无法打印我不断得到它的值 <__main__.card object at -->
- python - 为什么 Jupyter notebook 的代码存在 Pycharm 没有的问题?
- c++ - 扣除 string_view 的 std::make_pair 的一些奇怪行为