Reactjs 在localhost中运行React项目时出错

Reactjs 在localhost中运行React项目时出错,reactjs,npm,web-development-server,Reactjs,Npm,Web Development Server,我将azure devOps中的回购克隆到我的D驱动器中的一个文件夹中。然后我运行命令npmstart在localhost 3000中打开我的项目。它显示以下错误: 知道怎么修吗 D:\>cd HWS D:\HWS>git clone https://hwsaverllc@dev.azure.com/hwsaverllc/Concept%20Boy/_git/Frontend Cloning into 'Frontend'... remote: Azure Repos remote

我将azure devOps中的回购克隆到我的D驱动器中的一个文件夹中。然后我运行命令npmstart在localhost 3000中打开我的项目。它显示以下错误: 知道怎么修吗

D:\>cd HWS

D:\HWS>git clone https://hwsaverllc@dev.azure.com/hwsaverllc/Concept%20Boy/_git/Frontend
Cloning into 'Frontend'...
remote: Azure Repos
remote: Found 1081 objects to send. (200 ms)
Receiving objects: 100% (1081/1081), 774.29 KiB | 405.00 KiB/s, done.
Resolving deltas: 100% (645/645), done.

    D:\HWS>
    D:\HWS>npm start
    npm ERR! code ENOENT
    npm ERR! syscall open
    npm ERR! path D:\HWS\package.json
    npm ERR! errno -4058
    npm ERR! enoent ENOENT: no such file or directory, open 'D:\HWS\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\Intel\AppData\Roaming\npm-cache\_logs\2021-01-07T15_52_13_775Z-debug.log
    
    D:\HWS>

您需要从前端文件夹运行
npm start
,而不是从
HWS
运行。因此,只需在克隆存储库后添加
cd Frontend
命令即可

检查您是否位于
package.json
包含的正确路径中。非常感谢。它起作用了