simondotm / nx-firebase

Firebase plugin for Nx Monorepos
https://www.npmjs.com/package/@simondotm/nx-firebase
MIT License
175 stars 31 forks source link

Cannot read properties of undefined (reading 'options') #185

Closed mackelito closed 4 months ago

mackelito commented 5 months ago

When I run npx nx generate @simondotm/nx-firebase:function --name=api --app=bongo I get the error message Cannot read properties of undefined (reading 'options')...

Is it a requirement that the --app referred to is generated using this plugin?

My situation is that I have a angular app that needs a simple function and I just realised that... so I found this plugin and thought it looked sweet :D

So, will this not work for my setup?

simondotm commented 4 months ago

@mackelito you cannot have just an Nx-firebase function project in your Nx workspace. The plugin requires that you generate at least one Nx-firebase app project per workspace, to which each of your Nx-firebase function projects will be linked.

If you already have a firebase.json setup in your angular workspace, I'd recommend you generate a firebase app with the plugin, and then make the necessary modifications to firebase.json configs to reflect your existing setup.

That error message you have is unhelpful however, so I will look into making that better.