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

error: unknown option '--local' when trying to install an extension using CLI #4577

Closed
vajahath opened this issue May 20, 2022 · 11 comments · Fixed by #4584
Closed

error: unknown option '--local' when trying to install an extension using CLI #4577

vajahath opened this issue May 20, 2022 · 11 comments · Fixed by #4584
Assignees

Comments

@vajahath
Copy link

[REQUIRED] Environment info

firebase-tools: 11.0.0
Platform:: Ubuntu

[REQUIRED] Test case

$ firebase ext:install typesense/firestore-typesense-search --local --project=xxx
error: unknown option '--local'

Also checked with --help. But not giving enough info:

$ firebase ext:install --help
Usage: firebase ext:install [options] [extensionName]

install an official extension if [extensionName] or [extensionName@version] is provided; or run with `-i` to see all available extensions.

Options:
  -f, --force  automatically accept all interactive prompts
  -h, --help   output usage information

[REQUIRED] Steps to reproduce

I was trying to install an extension and try it in emulator. For that I followed as per firebase extension page.

Screenshot from 2022-05-20 11-31-44

[REQUIRED] Expected behavior

I don't know. I was trying. I hope this should install the extension locally so that I can test with emulator.

[REQUIRED] Actual behavior

error: unknown option '--local'

Screenshot from 2022-05-20 11-19-59

Run the command with --debug flag, and include the logs below: same result

Additionally, all the blue links in steps 3, 4, 5 are broken.
Screenshot from 2022-05-20 11-32-57

@vajahath vajahath added the bug label May 20, 2022
@shauryaaher
Copy link

shauryaaher commented May 20, 2022

I have the same problem with the Stripe Payments Extension. I think it's because of the latest firebase-tools version. The latest version 11.0.0. is a MAJOR version and is causing all sorts of problems.

@shauryaaher
Copy link

This issue needs attention.

@shauryaaher
Copy link

Can someone add the 'needs attention' label, please?

@joehan
Copy link
Contributor

joehan commented May 24, 2022

Hi @shauryaaher + @vajahath - sorry for the confusion here. As of firebase-tools@11.0.0, the default behavior is the same as --local. In order to install an extension locally, just run firebase ext:install (no --local flag). To deploy that to your project, then run firebase deploy --only extensions.

I'll make a fix to this ASAP to not error out if the --local flag is passed in. Sorry for the inconvience!

@benomatis
Copy link

will firebase ext:install not actually attempt to install the extension onto the default selected project instead of the emulator? if that's not the case, how do you install the extension to the default project instead, ie. how does v11 decide whether it should install to the default project or the emulator?

@joehan
Copy link
Contributor

joehan commented May 24, 2022

@benomatis Yes - as of firebase-tools@11, this is now a 2 step process. First, you add an extension to your local extensions manifest by running:

firebase ext:install

Then, you can emulate it by running:

firebase emulators:start

or actually install it onto a project by running:

firebase deploy (--only extensions)

If you then want to reconfigure, update, or delete an extension, you follow the same process. First, use the corresponding command to make a change in your local manifest:

firebase ext:(configure|update|uninstall) instance-name

then, run the same commands as above to emulate or deploy the new changes.
The docs (https://firebase.google.com/docs/extensions/manifest) lay this out in more detail.

@benomatis
Copy link

@joehan This worked, thank you.

@joehan
Copy link
Contributor

joehan commented May 24, 2022

Thanks everyone for reporting this. Just released firebase-tools@11.0.1, which includes a fix for this.

@shauryaaher
Copy link

Thanks a lot!

@vajahath
Copy link
Author

@joehan Thanks! Can you also correct the broken links on the extension page?

I've reported that as well in this issue. If --local is not necessary, maybe we can remove it from there as well.
(Ctrl + F here: all the blue links in steps 3, 4, 5 are broken)

Extension page: https://firebase.google.com/products/extensions/typesense-firestore-typesense-search#:~:text=How%20to%20install%20this%20extension

@benomatis
Copy link

@joehan: adding to the suggestion of @vajahath, I understand from the code that the --local flag is effectively deprecated, so it should probably not be there in the main docs, right?

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

Successfully merging a pull request may close this issue.

4 participants