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

tns plugin add nativescript-plugin-firebase seems to hang forever #275

Closed
stuartlangridge opened this issue Feb 5, 2017 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@stuartlangridge
Copy link

stuartlangridge commented Feb 5, 2017

(on node 6.9.5, npm 3.10.10, Ubuntu 16.04)

The actual hang is happening when the tns code shells out to npm install. My speculation is that ns-p-firebase is asking initial configuration questions ("are you using iOS", that sort of thing) but tns isn't connecting it to the controlling terminal, so the tns plugin add command is hung waiting at an invisible question...

@EddyVerbruggen EddyVerbruggen self-assigned this Feb 5, 2017
@EddyVerbruggen
Copy link
Owner

EddyVerbruggen commented Feb 5, 2017

You're right, it must be the CLI blocking the prompts...

Must be caused by the {N} 2.5.0 update. I assume you're using that.

A workaround for folks encountering this would be to use npm i nativescript-plugin-firebase, or add a configuration file to the root of your project manually: Add a file firebase.nativescript.json as a sibling to the app folder (not inside it!) and paste these contents:

{
    "using_ios": true,
    "using_android": true,
    "remote_config": true,
    "messaging": true,
    "crash_reporting": true,
    "storage": true,
    "facebook_auth": true,
    "google_auth": true
}

Set anything you don't need to false.

Then install the plugin.

@stuartlangridge
Copy link
Author

stuartlangridge commented Feb 5, 2017

Oops yes I'm using NS 2.5.0; sorry I didn't mention that!

(I filed this because I was worried that tns plugin add foobar did more than just npm i foobar (otherwise why does tns plugin add exist?) If we can just npm install the plugin then that's great.)

@EddyVerbruggen
Copy link
Owner

EddyVerbruggen commented Feb 5, 2017

I'm not sure of the amount of sugar tns plugin add adds on top of npm i, but I personally always use the former.

This nativescript-cli issue may be the cause, but I'm not sure yet.

UPDATE: the issue/fix I linked to is not relevant; I just updated to nativescript@next (where that's merged) and it still hangs.

@JoeyHengst
Copy link

JoeyHengst commented Feb 6, 2017

Ah good lord note to self first check the repo of the plugin. Have been fighting with this for a couple of hours to get it to work lol :S

@EddyVerbruggen
Copy link
Owner

EddyVerbruggen commented Feb 7, 2017

@StudderVOF yeah it's a pity. Somehow the {N} 2.5 CLI broke the prompts 😞

I've now updated the plugin to not ask the questions during installation, and added a note to the doc how to run the setup script yourself. Will also file an issue with {N}.

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

No branches or pull requests

3 participants