簡體   English   中英

我的 React 應用程序在我的 PC 上無法正常工作

[英]My React Application is not working correctly on my PC

我有一個問題,我真的不認為是我的代碼,而是我的電腦? 我正在與一個團隊合作開發一個 React 應用程序。 我們都在這方面學習。

我們的前端需要向后端請求一些信息,然后將其顯示在我們的網站上。 這段代碼適用於所有團隊成員......但出於某種原因,即使終端說是相同的代碼(即使我從我的團隊成員克隆項目)我終端中的后端也永遠不會向前端顯示任何內容加載。

沒有給出錯誤......只是在我的電腦上無法正常工作,我的反應應用程序沒有任何變化。

我嘗試檢查代碼,但代碼完全沒問題,正如我之前提到的……我的團隊成員沒有任何問題,只有我。

我應該檢查 Windows 10 PC 的任何功能是否與我的反應發生沖突而不告訴我?

注意:我是第一次在這里發帖,如果我需要提供一些額外的東西,請告訴我。 :'-(

來自我的終端的信息:

[0] 
[0] > knowrona@1.0.0 server C:\Users\jalej\OneDrive\Desktop\Programacion\knowrona
[0] > nodemon server.js
[0]
[1]
[1] > knowrona@1.0.0 client C:\Users\jalej\OneDrive\Desktop\Programacion\knowrona
[1] > npm start --prefix client
[1]
[0] [nodemon] 2.0.4
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching path(s): *.*
[0] [nodemon] watching extensions: js,mjs,json
[0] [nodemon] starting `node server.js`
[1] 
[1] > client@0.1.0 start C:\Users\jalej\OneDrive\Desktop\Programacion\knowrona\client
[1] > react-scripts start
[1]
[0] Server running on port 5000
[1] i 「wds」: Project is running at _____________ :-)
[1] i 「wds」: webpack output is served from
[1] i 「wds」: Content not from webpack is served from C:\Users\jalej\OneDrive\Desktop\Programacion\knowrona\client\public
[1] i 「wds」: 404s will fallback to /
[1] Starting the development server...
[1]
[1] Compiled with warnings.
[1]
[1] ./src/components/ProfileIcon/ProfileIcon.js
[1]   Line 10:22:  Unexpected empty object pattern
                                  no-empty-pattern
[1]   Line 13:7:   Redundant alt attribute. Screen-readers already announce `img` tags as an image. You don’t need to use the words `image`, `photo,` or `picture` (or any specified custom words) in the alt prop  jsx-a11y/img-redundant-alt
[1]
[1] ./src/QuizSession/Question/Question.js
[1]   Line 37:39:   Expected to return a value in arrow function  array-callback-return
[1]   Line 116:24:  Expected '!==' and instead saw '!='           eqeqeq
[1]
[1] ./src/Home/Home.js
[1]   Line 39:5:  Expected a default case  default-case
[1]   Line 56:9:  Unreachable code         no-unreachable
[1]   Line 67:9:  Unreachable code         no-unreachable
[1]   Line 72:9:  Unreachable code         no-unreachable
[1]
[1] Search for the keywords to learn more about each warning.
[1] To ignore, add // eslint-disable-next-line to the line before.
[1]
[0] loaded
[0] loaded
[0] loaded
[0] loaded
[0] loaded
[0] connect ECONNREFUSED 127.0.0.1:27017
[0] loaded
[0] loaded
[0] loaded
[0] loaded

" 27017 是 MongoDB 的默認端口,看起來應用程序正在嘗試訪問它。如果您需要在系統上運行一個 mongodb 實例,您可以弄清楚/與您的團隊成員核實,或者您是否需要指向一個歸你的團隊所有

所以我所做的是安裝缺少的 MongoDB,然后在 VS Code 中安裝擴展。

https://docs.mongodb.com/manual/installation/ https://code.visualstudio.com/docs/azure/mongodb

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM