konradkalemba / korona.ws

🗺 Coronavirus interactive map of Poland
https://korona.ws
73 stars 29 forks source link

Error: clientAppId must be set to a non-empty string #74

Closed picheli20 closed 4 years ago

picheli20 commented 4 years ago

While trying to setup the project locally I've faced the following error:

Error: clientAppId must be set to a non-empty string
Function.Stitch.initializeAppClient
src/core/Stitch.ts:115
Module../src/helpers/stitch.js
src/helpers/stitch.js:13
  10 |   REACT_APP_MONGO_DB_NAME,
  11 | } = process.env;
  12 | 
> 13 | const client = Stitch.hasAppClient(REACT_APP_STITCH_APP_ID)
  14 |   ? Stitch.getAppClient(REACT_APP_STITCH_APP_ID)
  15 |   : Stitch.initializeAppClient(REACT_APP_STITCH_APP_ID);
  16 | 

I've added the following config into the .env (on the root of the application):

REACT_APP_FIREBASE_API_KEY="AIzaSyCPS3X5r_4yRqpOzjA4C5VbhQJTF7Yix4U"
REACT_APP_FIREBASE_AUTH_DOMAIN="korona-ws.firebaseapp.com"
REACT_APP_FIREBASE_DATABASE_URL="https://korona-ws.firebaseio.com"
REACT_APP_FIREBASE_PROJECT_ID="korona-ws"
REACT_APP_FIREBASE_APP_ID="1:796612519278:web:615f751de390eb229acd7f"
REACT_APP_FIREBASE_MEASUREMENT_ID="G-ZMLEREM05R"

Maybe REACT_APP_STITCH_APP_ID is missing on .env and it's mandatoy?

konradkalemba commented 4 years ago

Oops. I didn't update the CONTRIBUTING.md file after migrating to Stitch. Just add the following lines to your .env:

REACT_APP_STITCH_APP_ID="korona-ws-ddqgu"
REACT_APP_STITCH_SERVICE_NAME="korona-ws-cluster"
REACT_APP_MONGO_DB_NAME="main"