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 create a new project demo at apps/demo. It already exists. #184

Closed mackelito closed 4 months ago

mackelito commented 5 months ago

So this is just a suggestion but it would be nice if we could just init a existing project and just generate the config files etc :)

npx nx g @simondotm/nx-firebase:app demo-site --project=demo

>  NX  Generating @simondotm/nx-firebase:application
>  NX   Cannot create a new project demo-site at apps/demo-site. It already exists.
simondotm commented 4 months ago

@mackelito this looks related to the other issue you reported.

Yes, that is an Nx behaviour - it is not possible to create two Nx projects with the same name. It would also be very hard for the plugin to attempt to merge the files it needs into an existing project with a schema/layout that is unknown to the plugin.

The best advice I can give is to create a firebase app with the plugin, and then adjust the various files & configs & projects in your workspace to fit your preferences.