This App’s all functions work in Local
but api and FIREBASE_PRIVATE_KEY didn’t work in Netlify
Build problems ( I solvedi it but still didn’t work)
I cannot build with this env '"-----BEFORE PRIVATE KEY-----\nA\nB\nC\nF\n-----END PRIVATE KEY-----\n"'
So I changed this line "-----BEFORE PRIVATE KEY-----\nA\nB\nC\nF\n-----END PRIVATE KEY-----\n"
Then I builded successfully
FirebaseAppError: Service account object must contain a string "client_email" property.
at FirebaseAppError.FirebaseError [as constructor] (/var/task/node_modules/firebase-admin/lib/utils/error.js:44:28)
at FirebaseAppError.PrefixedFirebaseError [as constructor] (/var/task/node_modules/firebase-admin/lib/utils/error.js:90:28)
at new FirebaseAppError (/var/task/node_modules/firebase-admin/lib/utils/error.js:125:28)
at new ServiceAccount (/var/task/node_modules/firebase-admin/lib/app/credential-internal.js:137:19)
at new ServiceAccountCredential (/var/task/node_modules/firebase-admin/lib/app/credential-internal.js:70:15)
at Object.cert (/var/task/node_modules/firebase-admin/lib/app/credential-factory.js:103:54)
at ee (/var/task/node_modules/next-firebase-auth/build/index.node.js:2:20653)
at /var/task/node_modules/next-firebase-auth/build/index.node.js:2:21480
at Generator.next (<anonymous>)
at asyncGeneratorStep (/var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24) {
errorInfo: {
code: 'app/invalid-credential',
message: 'Service account object must contain a string "client_email" property.'
},
codePrefix: 'app'
}
Oh , I will search about about firebase admin . I thought it has error in my env key because I got error like this in my Local when I removed that FIREBASE_PRIVATE_KEY in env.local.
You are the only one can save me.