emberfire install results in generate error message
RonyOCuinn opened this issue ยท 17 comments
Version info
DEBUG: Ember : 3.10.1
DEBUG: Ember Data : 3.10.0
DEBUG: EmberFire : 3.0.0-rc.3
DEBUG: jQuery : 3.4.1
DEBUG: -------------------------------
Steps to reproduce
Run ember install emberfire@next
, then ember serve
. Attempt to save some data:
const newInvitation = this.store.createRecord('invitation', {email: email});
newInvitation.save()
Expected behavior
Emberfire should install and the data should send to the Firebase server and display on the server.
Actual behavior
Installing gives this:
$ ember install emberfire@next
- Installing addon package
- npm: Installing emberfire@next ...
npm: Installed emberfire@next
installing emberfire
The `ember generate ` command requires an entity name to be specified. For more details, use `ember help`.
--
And attempting to save the data gives:
Failed to create an instance of 'adapter:application'. Most likely an improperly defined class or an invalid module export.
I've tried deleting the folder in node_modules
and re-installing and now I get the error Could not find module
emberfire/adapters/firebaseimported from
library-app/adapters/application``. My app/adapters/application.js
looks like this:
import FirebaseAdapter from 'emberfire/adapters/firebase';
export default FirebaseAdapter.extend({
});
I have some problem.
@RonyOCuinn we no longer have a Firebase Adapter in 3; there's a RealtimeDatabaseAdapter and FirestoreAdapter located at emberfire/adapters/firestore
and emberfire/adapters/realtime-database
respectively. Give those a try.
This page https://github.com/firebase/emberfire/blob/master/docs/quickstart.md notes that $ ember install emberfire@next
should generate a FirestoreAdapter at app/adapters/application.js
. That adapter was not generated and I received the sameember generate
error mentioned above. I manually created the FirestoreAdapter and was able to read and write. I searched the repo for generate
hoping to find the culprit but came up empty.
There was a bug, I'll check on that. Sorry docs are WIP right now.
I'm getting exactly this problem too, running:
ember new quickstart
cd quickstart
ember install emberfire@next
I get this error:
npm: Installed emberfire
installing emberfire
The `ember generate <entity-name>` command requires an entity name to be specified. For more details, use `ember help`.
I'm very new to ember-cli and app development in general, so I don't know how to get around this problem, can anyone give me a step by step guide to getting ember working with Firebase if the existing documents are inaccurate. At the moment I am completely stuck
I have followed the quickstart guide here https://github.com/firebase/emberfire/blob/master/docs/quickstart.md and I've even tried uninstalling ember-cli and reinstalling
My setup:
Mac Mojave 10.14.5
os darwin x64
Node v10.16.0
Npm v 6.10.2
Ember-cli v3.11.0
@thelar see the ember 3.11 release notes. There is a known bug in the ember data generators. Try downgrading to 3.10
@jamesstaub that didn't work I'm afraid, I downgraded to 3.10.1, same error and then I tried downgrading to 3.8.3 and got the same thing.
When I use ember install emberfire@2.0.10
it all seems to go well
Just to note as well that when using emberfire 2.0.10 I also had to downgrade ember-cli to 3.4.4.
This is only thing that is working for me, now I'm getting data showing up in my Firebase database as expected - but it's weird that none of the up to date libraries seem to work for me?
It seems there could be 2 issues here. This issue predated the generator's being broken in ember data so ember-data's bug did not cause the first ember generate <entity-name>
issue. (See the fix in emberjs/data#6274).
For pointers on where the install fails, you can run DEBUG="*" ember install
and see the debugging output printed to your terminal.
Is there anything evolving to get v3 installed? Cuz i'm unable to install from emberfire@next (ember generate error), emberfire@v2 is not working with cloud firestore database..
Has anyone managed to install emberfire@v3 ? Cuz i would love to, please.
@BelaLawson unless there is a compelling reason, you don't need to use emberfire with Firestore. I have found using an Ember Service with Firestore directly has been more than sufficient. Honestly, the Firebase team should look at letting the Ember community and more specifically the Ember Data community manage this project alongside them as updates take far too long. Please do not read that as a negative view on Firebase or the team that support the wonderful tools! I absolutely love Firebase, and @jamesdaniels and team are busy trying to keep the majority of the tools updated such as rxfire, angular/fire, emberfire, and then all of the great firebase packages too.
@bnetter does the problem persist with emberfire@canary
? I've not cut a new RC
@puchesjr I absolutely welcome assistance on this project. A good place to start would be a PR rather than asking for NPM credentials. I don't seem to get many volunteers...
A workaround for now is to just npm i --save emberfire@next
while I finish the bulldozing BTW.
Needed normalizeEntityName
in the blueprint. Addressed in rc.4