Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emberfire install results in generate error message #581

Closed
RonyOCuinn opened this issue Jun 17, 2019 · 17 comments
Closed

emberfire install results in generate error message #581

RonyOCuinn opened this issue Jun 17, 2019 · 17 comments

Comments

@RonyOCuinn
Copy link

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.
@RonyOCuinn
Copy link
Author

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 fromlibrary-app/adapters/application``. My app/adapters/application.js looks like this:

import FirebaseAdapter from 'emberfire/adapters/firebase';

export default FirebaseAdapter.extend({
});

@absemetov
Copy link

I have some problem.

@jamesdaniels
Copy link
Contributor

@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.

@iofusion
Copy link

iofusion commented Jun 24, 2019

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.

@jamesdaniels
Copy link
Contributor

There was a bug, I'll check on that. Sorry docs are WIP right now.

@thelar
Copy link

thelar commented Jul 29, 2019

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

@jamesstaub
Copy link

@thelar see the ember 3.11 release notes. There is a known bug in the ember data generators. Try downgrading to 3.10

@thelar
Copy link

thelar commented Jul 29, 2019

@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 [email protected] it all seems to go well

@thelar
Copy link

thelar commented Jul 29, 2019

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?

@ghost
Copy link

ghost commented Jul 29, 2019

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.

@BelaLawson
Copy link

BelaLawson commented Sep 16, 2019

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.

@puchesjr
Copy link

@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
Copy link
Contributor

bnetter commented Oct 7, 2019

I'm getting exactly this problem too, running:

ember new quickstart
cd quickstart
ember install emberfire@next

Same problem today. With the latest ember-cli.

image

@jamesdaniels
Copy link
Contributor

@bnetter does the problem persist with emberfire@canary? I've not cut a new RC

@jamesdaniels
Copy link
Contributor

@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...

@jamesdaniels
Copy link
Contributor

A workaround for now is to just npm i --save emberfire@next while I finish the bulldozing BTW.

@jamesdaniels
Copy link
Contributor

jamesdaniels commented Oct 8, 2019

Needed normalizeEntityName in the blueprint. Addressed in rc.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants