【问题标题】:Downloading/Running another persons React App下载/运行另一个人的 React 应用程序
【发布时间】:2020-02-07 21:12:51
【问题描述】:

我从 Github 上下载了一个朋友的 react 应用,看看一些功能在做什么和设计。我一直在尝试运行该应用程序,但一直遇到错误。我从 Zip 文件中提取文件夹并在命令行中运行 npm install 然后执行 npm start 遇到的错误如下:

PS C:\WINDOWS\System32\WindowsPowerShell\v1.0> npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\WINDOWS\System32\WindowsPowerShell\v1.0\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 
'C:\WINDOWS\System32\WindowsPowerShell\v1.0\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\RafayChaudhary\AppData\Roaming\npm-cache\_logs\2020-02- 
03T19_49_57_690Z-debug.log

请让我知道我做错了什么。

【问题讨论】:

    标签: node.js reactjs npm


    【解决方案1】:

    您的 PowerShell 目录指向 PowerShell 的系统目录,即

    PS C:\WINDOWS\System32\WindowsPowerShell\v1.0>
    

    您需要将其更改为您的 React 应用程序的目录,例如

    cd C:\Path\To\React\App
    npm i && npm start
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多