GoogleChromeLabs / estimator.dev

🧮 Calculate the size and performance impact of switching to modern JavaScript syntax.
https://estimator.dev
Apache License 2.0
665 stars 23 forks source link

How to start/setup locally? #16

Closed LyuboslavLyubenov closed 3 years ago

LyuboslavLyubenov commented 3 years ago

Hi!

Thank you for your project, it looks great, but i have trouble setting it up locally. I executed all commands, but i only got firebase dashboard to show up.


firebase emulators:start
!  emulators: You are not currently authenticated so some features may not work correctly. Please run firebase login to authenticate the CLI.
i  emulators: Starting emulators: functions, hosting
!  functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: auth, firestore, database, pubsub
!  Your requested "node" version "12" doesn't match your global version "14"
!  functions: You are not signed in to the Firebase CLI. If you have authorized this machine using gcloud application-default credentials those may be discovered and used to access production services.
!  hosting: Could not fetch web app configuration and there is no cached configuration on this machine. Check your internet connection and make sure you are authenticated. To continue, you must call firebase.initializeApp({...}) in your code before using Firebase.
i  hosting: Serving hosting files from: dist
+  hosting: Local server: http://localhost:5000
i  ui: downloading ui-v1.4.1.zip...
Progress: ================================================================> (100% of 4MB)
i  ui: Emulator UI logging to ui-debug.log
i  functions: Watching "C:\Users\Lyuboslav\Desktop\estimator.dev\server" for Cloud Functions...
+  functions[check]: http function initialized (http://localhost:5001/e-s-timator/us-central1/check).
+  functions[script]: http function initialized (http://localhost:5001/e-s-timator/us-central1/script).
+  functions[compiled]: http function initialized (http://localhost:5001/e-s-timator/us-central1/compiled).

┌─────────────────────────────────────────────────────────────┐
│ ✔  All emulators ready! It is now safe to connect your app. │
│ i  View Emulator UI at http://localhost:4000                │
└─────────────────────────────────────────────────────────────┘

┌───────────┬────────────────┬─────────────────────────────────┐
│ Emulator  │ Host:Port      │ View in Emulator UI             │
├───────────┼────────────────┼─────────────────────────────────┤
│ Functions │ localhost:5001 │ http://localhost:4000/functions │
├───────────┼────────────────┼─────────────────────────────────┤
│ Hosting   │ localhost:5000 │ n/a                             │
└───────────┴────────────────┴─────────────────────────────────┘
  Emulator Hub running at localhost:4400
  Other reserved ports: 4500

Issues? Report them at https://github.com/firebase/firebase-tools/issues and attach the *-debug.log files.```
Drarig29 commented 3 years ago

After that, you can run npm start, which will start the frontend, I think.

developit commented 3 years ago

Ah - my apologies - Firebase does host the frontend, you just have to run a build first:

git clone <url> estimator
cd estimator
npm install
npm run build  # <-- need to run this
firebase emulators:start