File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -14,16 +14,16 @@ export const FIREBASE_ADMIN = 'FIREBASE_ADMIN';
1414export const FirebaseProvider : Provider = {
1515 provide : FIREBASE_ADMIN ,
1616 useFactory : ( ) => {
17- // Use process.cwd() and append '/../../google-services.json' to find project root file
18- const serviceAccountPath = path . resolve ( process . cwd ( ) , '../../ google-services.json' ) ;
19- console . log ( '[FirebaseProvider] Looking for service account at:' , serviceAccountPath ) ;
20- const parentDir = path . dirname ( serviceAccountPath ) ;
21- try {
22- const files = fs . readdirSync ( parentDir ) ;
23- console . log ( `[FirebaseProvider] Files in ${ parentDir } :` , files ) ;
24- } catch ( err ) {
25- console . error ( `[FirebaseProvider] Failed to list files in ${ parentDir } :` , err ) ;
26- }
17+ // Use process.cwd() and append '/../../google-services.json' to find project root file
18+ const serviceAccountPath = path . resolve ( process . cwd ( ) , 'google-services.json' ) ;
19+ console . log ( '[FirebaseProvider] Looking for service account at:' , serviceAccountPath ) ;
20+ const parentDir = path . dirname ( serviceAccountPath ) ;
21+ try {
22+ const files = fs . readdirSync ( parentDir ) ;
23+ console . log ( `[FirebaseProvider] Files in ${ parentDir } :` , files ) ;
24+ } catch ( err ) {
25+ console . error ( `[FirebaseProvider] Failed to list files in ${ parentDir } :` , err ) ;
26+ }
2727 if ( ! fs . existsSync ( serviceAccountPath ) ) {
2828 console . error ( '[FirebaseProvider] google-services.json not found in project root.' ) ;
2929 throw new Error ( 'google-services.json not found in project root' ) ;
You can’t perform that action at this time.
0 commit comments