ngxs-labs / firestore-plugin

Firestore plugin for NGXS
https://ngxs-firebase-plugin.netlify.com/
MIT License
20 stars 14 forks source link

Not working with angular 15 #71

Closed bokzor closed 1 year ago

bokzor commented 1 year ago

Got this error while using angular 15

Error: node_modules/@ngxs-labs/firestore-plugin/lib/ngxs-firestore.module.d.ts:9:106 - error TS2339: Property 'ɵbc' does not exist on type 'typeof import("x/node_modules/@ngxs/store/ngxs-store")'.

9     static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsFirestoreModule, never, [typeof i1.CommonModule, typeof i2.ɵbc], never>;
    "@angular/animations": "^15.0.0",
    "@angular/common": "^15.0.0",
    "@angular/compiler": "^15.0.0",
    "@angular/core": "^15.0.0",
    "@angular/fire": "^7.5.0",
    "@angular/forms": "^15.0.0",
    "@angular/platform-browser": "^15.0.0",
    "@angular/platform-browser-dynamic": "^15.0.0",
    "@angular/router": "^15.0.0",
    "@ngxs-labs/firestore-plugin": "^1.1.0",
    "@ngxs/devtools-plugin": "^3.7.6",
    "@ngxs/logger-plugin": "^3.7.6",
    "@ngxs/store": "^3.7.6",
markterrill commented 1 year ago

The "ɵmod" error is the indicator that it's actually your angular cache. Try clearing your angular cache. rm -rf .angular/cache

bokzor commented 1 year ago

Deleted the folder and still having the issue. So I suppose it's not the root cause. When removing the import from app.module, it works again.

kinderswan commented 1 year ago

I had the same issue as @bokzor so I decided to debug it a bit. It appears that ngxs-firestore.module.ts on importing cannot resolve its own import NgxsModule.forFeature([NgxsFirestoreState]) and fails on compilation. To check my thoughts and somehow to fix it, I cloned the repo and simply removed the second import - and it works like a charm. Maybe it is not essential to create firebase feature state by your own and give an opportunity for the end user?

acadianaapps commented 1 year ago

Having same issue but on angular v14.2.12

joaqcid commented 1 year ago

would you be able to create a repro on stackbliz?

joaqcid commented 1 year ago

im currenlty on

"@angular/core": "14.2.12", "@ngxs-labs/firestore-plugin": "^0.1.35", "@angular/fire": "^6.1.5", "firebase": "^8.6.2",

and works fine

kinderswan commented 1 year ago

@joaqcid It breaks with the latest version, e.g "@ngxs-labs/firestore-plugin": "^1.1.0",

joaqcid commented 1 year ago

it looks like the issue is between typescript version and firebase types

joaqcid commented 1 year ago

@kinderswan are you still having issues?

joaqcid commented 1 year ago

@acadianaapps are you still having issues?

joaqcid commented 1 year ago

@bokzor are you still having issues?

acadianaapps commented 1 year ago

@acadianaapps are you still having issues?

Honestly I had to abandon it, I understood the library and it worked when it would build, but always running into build issues. Will revisit soon.

JGSolutions commented 1 year ago

i guess i will stay away from this library as I am starting a new project and don't want any headaches

joaqcid commented 1 year ago

@JGSolutions latest version 1.2.4 works with ng 15 and latest @ngxs/store

JGSolutions commented 1 year ago

@joaqcid will take a look at it.