сервер разработки всегда отключается в моем приложении реакции. Что может быть причиной этого? - PullRequest
0 голосов
/ 26 февраля 2020

Я создал приложение реагирования и подключил его к серверу, работающему на heroku для проведения аутентификации в goolge. Кажется, что сервер разработки всегда отключается, поэтому я не могу связаться с Google oauth. Странно то, что когда я в первый раз открываю google chrome или firefox, он работает, и я могу получить доступ к странице входа в gmail, но со второй попытки в консоли отображается предупреждение «Сервер разработки отключен. При необходимости обновите sh страницу. " На скриншоте вы видите сообщение консоли браузера! Как я могу решить эту проблему?

А вот при запуске сервера появляется сообщение консоли терминала:


> server@1.0.0 dev C:\Users\RaWinkler\Desktop\server
> concurrently "npm run server" "npm run client"

[0]
[0] > server@1.0.0 server C:\Users\RaWinkler\Desktop\server
[0] > nodemon index.js
[0]
[1]
[1] > server@1.0.0 client C:\Users\RaWinkler\Desktop\server
[1] > npm run start --prefix client
[1]
[0] [nodemon] 2.0.2
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching dir(s): *.*
[0] [nodemon] watching extensions: js,mjs,json
[0] [nodemon] starting `node index.js`
[1]
[1] > client@0.1.0 start C:\Users\RaWinkler\Desktop\server\client
[1] > react-scripts start
[1]
[0] (node:37624) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
[0] (node:37624) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
[1] [HPM] Proxy created: /auth/google  -> http://localhost:5000
[1] [HPM] Proxy created: /api/**  -> http://localhost:5000
[1] i 「wds」: Project is running at http://10.0.0.183/
[1] i 「wds」: webpack output is served from
[1] i 「wds」: Content not from webpack is served from C:\Users\RaWinkler\Desktop\server\client\public
[1] i 「wds」: 404s will fallback to /
[1] Starting the development server...
[1]
[1] Compiled successfully!
[1]
[1] You can now view client in the browser.
[1]
[1]   Local:            http://localhost:3000
[1]   On Your Network:  http://10.0.0.183:3000
[1]
[1] Note that the development build is not optimized.
[1] To create a production build, use yarn build.
[1]

введите описание изображения здесь

...