Skip to content
Advertisement

nativescript-firebase ios initialisation ReferenceError: FIROptions is not defined

I have an issue with the firebase initialisation on my nativescript app (nativescript-vue). I am using the nativescript-firebase plugin from https://github.com/EddyVerbruggen/nativescript-plugin-firebase
Here is my initialisation:

JavaScript

This works fine on android, but on ios, I get the error from my console.log
ReferenceError: FIROptions is not defined

My firebase.nativescript.json file is the following:

JavaScript

I have tried removing and adding the plugin and running ns clean on my project but it didn’t change anything.
Another issue I have is that I do not get prompted the questions (the ones that fill up the json file) when I add the plugin. On android I had to go to node_modules/@nativescrpt/firebase and run npm run config to get the questions. However, this command does nothing on ios. I have no error, in my terminal, but nothing happens.

Advertisement

Answer

I got it to work, the two issues were indeed linked. I had to run npm run config for the plugin to work correctly.
It turns out I was using an old version of npm. Updating npm and running npm run config again fixed my issue

Advertisement