Hacksore / turborepo-firebase-example

Turborepo + Firebase
https://turborepo-demo.web.app
48 stars 8 forks source link

⬢ functions: Failed to load function definition from source: FirebaseError: #3

Closed Andrew-Pynch closed 1 year ago

Andrew-Pynch commented 1 year ago

Cloned the repo but I am getting this when I try to run....

 andrew   main -  yarn start
yarn run v1.22.19
$ concurrently npm:dev npm:emulators
[dev] 
[dev] > turborepo-firebase@0.0.0 dev
[dev] > turbo run dev --parallel
[dev] 
[emulators] 
[emulators] > turborepo-firebase@0.0.0 emulators
[emulators] > firebase emulators:start
[emulators] 
[dev] • Packages in scope: api, config, shared, tsconfig, web
[dev] • Running dev in 5 packages
[dev] • Remote caching disabled
[dev] api:dev: cache bypass, force executing e5aeff3c8afa1a6c
[dev] web:dev: cache bypass, force executing f9dda9a45a17404d
[dev] web:dev: 
[dev] web:dev: > web@0.0.0 dev
[dev] web:dev: > vite
[dev] web:dev: 
[dev] api:dev: 
[dev] api:dev: > dev
[dev] api:dev: > rollup -w -c rollup.config.js
[dev] api:dev: 
[dev] api:dev: [!] Error: Cannot find module '@rollup/plugin-typescript'
[dev] api:dev: Require stack:
[dev] api:dev: - /home/andrew/Github/turborepo-firebase-example/apps/api/rollup.config.js
[dev] api:dev: - /home/andrew/Github/turborepo-firebase-example/node_modules/rollup/dist/shared/loadConfigFile.js
[dev] api:dev: - /home/andrew/Github/turborepo-firebase-example/node_modules/rollup/dist/bin/rollup
[dev] api:dev: Error: Cannot find module '@rollup/plugin-typescript'
[dev] api:dev: Require stack:
[dev] api:dev: - /home/andrew/Github/turborepo-firebase-example/apps/api/rollup.config.js
[dev] api:dev: - /home/andrew/Github/turborepo-firebase-example/node_modules/rollup/dist/shared/loadConfigFile.js
[dev] api:dev: - /home/andrew/Github/turborepo-firebase-example/node_modules/rollup/dist/bin/rollup
[dev] api:dev:     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
[dev] api:dev:     at Function.Module._load (node:internal/modules/cjs/loader:841:27)
[dev] api:dev:     at Module.require (node:internal/modules/cjs/loader:1067:19)
[dev] api:dev:     at require (node:internal/modules/cjs/helpers:103:18)
[dev] api:dev:     at Object.<anonymous> (/home/andrew/Github/turborepo-firebase-example/apps/api/rollup.config.js:5:18)
[dev] api:dev:     at Module._compile (node:internal/modules/cjs/loader:1165:14)
[dev] api:dev:     at Object.require.extensions.<computed> [as .js] (/home/andrew/Github/turborepo-firebase-example/node_modules/rollup/dist/shared/loadConfigFile.js:621:20)
[dev] api:dev:     at Module.load (node:internal/modules/cjs/loader:1043:32)
[dev] api:dev:     at Function.Module._load (node:internal/modules/cjs/loader:878:12)
[dev] api:dev:     at Module.require (node:internal/modules/cjs/loader:1067:19)
[dev] api:dev: 
[dev] web:dev: 
[dev] web:dev:   vite v2.9.15 dev server running at:
[dev] web:dev: 
[dev] web:dev:   > Local: http://localhost:3000/
[dev] web:dev:   > Network: use `--host` to expose
[dev] web:dev: 
[dev] web:dev:   ready in 160ms.
[dev] web:dev: 
[emulators] i  emulators: Starting emulators: functions, hosting
[emulators] ⚠  functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: auth, firestore, database, pubsub, storage
[emulators] ⚠  functions: Unable to fetch project Admin SDK configuration, Admin SDK behavior in Cloud Functions emulator may be incorrect.
[emulators] ⚠  hosting: Authentication error when trying to fetch your current web app configuration, have you run firebase login?
[emulators] ⚠  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.
[emulators] i  hosting[turborepo-demo]: Serving hosting files from: apps/web/dist
[emulators] ✔  hosting[turborepo-demo]: Local server: http://127.0.0.1:5000
[emulators] i  ui: Emulator UI logging to ui-debug.log
[emulators] i  functions: Watching "/home/andrew/Github/turborepo-firebase-example/apps/api/dist" for Cloud Functions...
[emulators] ⬢  functions: Failed to load function definition from source: FirebaseError: Could not detect language for functions at /home/andrew/Github/turborepo-firebase-example/apps/api/dist
Hacksore commented 1 year ago

I think I made some breaking changes to this repo 😬. I haven't had much time to revisit this but if you have any thoughts on how improve happy to merge a PR.

Andrew-Pynch commented 1 year ago

I don’t I’m totally lost haha

On Sat, Feb 18, 2023 at 10:24 AM Sean Boult @.***> wrote:

I think I made some breaking changes to this repo 😬. I haven't had much time to revisit this but if you have any thoughts on how improve happy to merge a PR.

— Reply to this email directly, view it on GitHub https://github.com/Hacksore/turborepo-firebase-example/issues/3#issuecomment-1435710578, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKKSYUSV5V2UU7ARD4K7JPTWYDZULANCNFSM6AAAAAAU74VHZI . You are receiving this because you authored the thread.Message ID: @.***>

-- ~Cheers!

Hacksore commented 1 year ago

Please try the latest changes.