【问题标题】:I have started in react but when I am typing npm start it gives these set of error mesaages我已经开始做出反应,但是当我输入 npm start 时,它会给出这些错误消息
【发布时间】:2020-11-20 09:12:23
【问题描述】:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\tarun\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\tarun\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\tarun\AppData\Roaming\npm-cache\_logs\2020-11-20T09_05_27_487Z-debug.log

【问题讨论】:

  • 看起来你在反应项目之外运行 npm start

标签: reactjs npm


【解决方案1】:

从错误消息中可以看出,npm 在您的当前目录(即C:\Users\tarun)中找不到package.json 文件。

很可能您没有从正确的目录运行命令。

【讨论】:

    【解决方案2】:

    需要在 package.json 文件目录下运行命令。

    【讨论】:

      猜你喜欢
      • 2020-04-19
      • 1970-01-01
      • 2021-11-30
      • 2011-10-11
      • 2021-09-19
      • 1970-01-01
      • 2021-09-11
      • 2020-06-21
      • 2019-04-26
      相关资源
      最近更新 更多