activitree / meteor-push

Meteor Push Notifications for Cordova and Web/PWA with Firebase (FCM).
MIT License
27 stars 19 forks source link

EventState is not defined #24

Closed Ziyad33 closed 3 years ago

Ziyad33 commented 3 years ago

From the example files there is a folder inside app lib/server/pushToDB.js in line 6 has the following line const Push = new EventState(); triggers the following error in the terminal:

ReferenceError: EventState is not defined W20200806-20:45:01.346(4)? (STDERR) at module (lib/server/pushToDB.js:6:14)

Is there certain package I need to add?

UPDATE

I tried to add raix:eventstate package, the problem disappear but I get the error in the line after it Push.notifications = new Mongo.Collection("_push_notifications"); that says there is already a collection named _push_notifications,

Error: There is already a collection named "_push_notifications"

did I add the correct package? if yes, should I just change the name of _push_notifications collection?

thegizzada commented 3 years ago

Were you able to resolve this? I am experiencing the same issue.

Only difference being that even after adding raix:eventstate nothing changes.

image

Ziyad33 commented 3 years ago

yea, I noticed in package.js file that raix:eventstate@0.0.5 is being used, try to add the same package version with meteor add raix:eventstate@0.0.5, it might solve your issue.

Also make sure that you are using the latest version of activitree:push that is 2.0.7

thegizzada commented 3 years ago

yea, I noticed in package.js file that raix:eventstate@0.0.5 is being used, try to add the same package version with meteor add raix:eventstate@0.0.5, it might solve your issue.

Also make sure that you are using the latest version of activitree:push that is 2.0.7

Thank you!

paulincai commented 3 years ago

You should not need to install raix:eventstate 'manually'. This is a dependency which is supposed to be installed with meteor-push.