Error to DEPLOY next.js 13 with Firebase: TypeError: Cannot read properties of null (reading 'toString') - firebase

i'm in trouble to connect Firebase to next 13, already search for it on internet and a lot of people had similar problems
Error:
[debug] [2023-02-08T18:54:22.084Z] TypeError: Cannot read properties of null (reading 'toString')
at ɵcodegenFunctionsDirectory (C:\Users\idieg\AppData\Roaming\npm\node_modules\firebase-tools\lib\frameworks\next\index.js:222:18)
at async prepareFrameworks (C:\Users\idieg\AppData\Roaming\npm\node_modules\firebase-tools\lib\frameworks\index.js:306:84)
at async deploy (C:\Users\idieg\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\index.js:53:13)
[error]
[error] Error: An unexpected error has occurred.
also like to clarify that i already can emulate this without bugs and also ran the firebase experiments:enable webframeworks but i need to deploy it.

Related

Making a vue single spa application where I get the error "webpack compiled error" when I try to execute the project

ERROR in ./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css (./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css)
Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
TypeError: Cannot read properties of undefined (reading 'config')
ERROR in ./src/components/HelloWorld.vue?vue&type=style&index=0&id=469af010&scoped=true&lang=css (./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/HelloWorld.vue?vue&type=style&index=0&id=469af010&scoped=true&lang=css)
Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
TypeError: Cannot read properties of undefined (reading 'config')
I removed the node modules folder and attempted to re-create the project folder, but I received the same error.

FirebaseError: Installations: Create Installation request failed with error "403 PERMISSION_DENIED

I was working with Firebase with Angular framework in a project. I was using Firebase for sending push notifications. I followed this medium article and did like this. Everything was perfect up to allowing notification alerts. But after that token didn't print on the console and this error popped up.
`
notifications.component.ts:169 FirebaseError: Installations: Create Installation request failed with error "403 PERMISSION_DENIED: Requests to this API firebaseinstallations.googleapis.com method google.firebase.installations.v1.FirebaseInstallationsService.CreateInstallation are blocked." (installations/request-failed).
at index.esm2017.js:94:26
at Generator.next (<anonymous>)
at asyncGeneratorStep (asyncToGenerator.js:3:1)
at _next (asyncToGenerator.js:25:1)
at ZoneDelegate.invoke (zone.js:372:1)
at Object.onInvoke (core.mjs:25488:1)
at ZoneDelegate.invoke (zone.js:371:1)
at Zone.run (zone.js:134:1)
at zone.js:1276:1
at ZoneDelegate.invokeTask (zone.js:406:1)
`
And I found this StackOverflow answer as well and I did the same as that suggested. But still it gives the error.
Can someone help me with this?

How should I host the website on firebase?

after calling firebase init in vs code terminal, then opting Hosting, then opting to choose the existing projects
i am facing the below error
Error: Failed to list Firebase projects. See firebase-debug.log for more info.
how should i resolve it?
firebase log file
at Client.doRequest (/usr/local/lib/node_modules/firebase-tools/lib/apiv2.js:209:23)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Client.request (/usr/local/lib/node_modules/firebase-tools/lib/apiv2.js:96:20)
at async getProjectPage (/usr/local/lib/node_modules/firebase-tools/lib/management/projects.js:233:17)
at async getFirebaseProjectPage (/usr/local/lib/node_modules/firebase-tools/lib/management/projects.js:250:23)
at async selectProjectInteractively (/usr/local/lib/node_modules/firebase-tools/lib/management/projects.js:95:41)
at async Object.doSetup [as project] (/usr/local/lib/node_modules/firebase-tools/lib/init/features/project.js:87:27)
at async init (/usr/local/lib/node_modules/firebase-tools/lib/init/index.js:19:9)
[error]
[error] Error: Failed to list Firebase projects. See firebase-debug.log for more info.
please guide

expo and firestore, unhandled promise rejection: typeError

I have been getting this error for the last two days now.
This happened after I installed a node module named "faker". What I've found out until now is that npm 5 deleted any packages from the package.lock.json that were not installed using npm 5.
Hence I deleted node modules and the package.lock.json and did an npm install, it didn't help.
I created a separate expo project and copied the files over to it from the old project and installed every module again, it still does not work.
Below is the error I am getting:
[15:18:35] [Unhandled promise rejection: TypeError: undefined is not a function (evaluating 'collection[typeof Symbol === "function" ? Symbol.iterator : "##iterator"]()')]
- node_modules/#firebase/firestore/dist/index.cjs.js:8293:17 in forEach
- node_modules/#firebase/firestore/dist/index.cjs.js:13322:42 in onTransactionCommitted
- ... 52 more stack frames from framework internals

ionic cordova fcm notifications error with firebase

i want to implement the notifications feature by firebase on my ionic application
so after proceeding with the following command
ionic cordova plugin add cordova-plugin-fcm
and adding the google-services.json to the main folder of my ionic project I am facing the following error with no success to solve it
(node:15256) UnhandledPromiseRejectionWarning: Unhandled promise rejection
(rejection id: 1): TypeError: Invalid data, chunk must be a string or
buffer, not object
(node:15256) [DEP0018] DeprecationWarning: Unhandled promise rejections are
deprecated. In the future, promise rejections that are not handled will
terminate the Node.js process with a non-zero exit code.
i found on google that firebase has several bugs on it's latest version which is 4.8.2 and 4.8.1 so as well i did a downgrade to firebase 4.8.0.
as well i tried the npm install and npm cache verify and i checked that i have the same package name in my project and firebase with no success to solve it.

Resources