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

cannot deploy backend function #26

Open
Rayapati-Tejasree opened this issue Nov 21, 2023 · 6 comments
Open

cannot deploy backend function #26

Rayapati-Tejasree opened this issue Nov 21, 2023 · 6 comments
Labels
question Usage or code question etc

Comments

@Rayapati-Tejasree
Copy link

Hi!
i cloned your git and did the changes according to the readme file. I successfully run the project. But couldn't deploy the backend function bcz of deploy --only "pairing" cmd.
ERROR SYAS - Cannot understand what targets to deploy/serve. No targets in firebase.json match '--only pairing.
Should i config the json file or did i miss something?
I'm new starting stage to development and this stuff ! sorry if it is a dumb qns !It would be great if you would help me!

@simonbengtsson simonbengtsson added the question Usage or code question etc label Nov 21, 2023
@simonbengtsson
Copy link
Owner

Likely there is some kind of config issues with your firebase project. I would advice you to follow the instructors in the documentation and deploy a "hello world" function first ensuring that work and then changing this code to the pairing function in this repository.

Firebase function docs: https://firebase.google.com/docs/functions

@tanishbajaj101
Copy link

i'm facing the same issue, were you able to solve it?

@gisborne
Copy link

Add me to the "me too" list.

@simonbengtsson
Copy link
Owner

Must be some missing/wrong in the readme then. Some suggestions

@gisborne
Copy link

gisborne commented Aug 16, 2024

Okay.

This led me to a bunch of things I needed to do.

On the Firebase admin page, I had to enable functions, which required me to set up billing and also to upgrade the project (I wasn't clear what this did), but seemed a separate step, required to turn on billing. which appears to be needed to turn on functions.

In the course of doing this, it walked me through doing a few things. Note that I chose to turn on linting when I installed firebase-tools, which is part of what I have to follow up on. Also, the latest version of firebase-tools appears to not work on Mac (I get /bin/sh: --: invalid option, so I had to downgrade firebase-tools:

npm -g install [email protected] #12.1.0 might work
npm install eslint

Also removed this:

,
      "predeploy": [
        "npm --prefix \"$RESOURCE_DIR\" run lint"
      ]

from firebase.json.

It seems my particular version of node (21) doesn't work. I tried this:

 sudo npm cache clean -f
 sudo npm install -g n
 sudo n stable
 brew install node@22
 node -v
v22.6.0

firebase deploy now gives me:

Error: Detected node engine >=16 in package.json, which is not a supported version. Valid versions are 10, 12, 14, 16, 18, 20, 22

I tried to fix this with "node": ">=16" in package.json, but as you see it still doesn't work. So I changed it to "22". Now I get:

Failed to create function projects/qrit-47b40/locations/us-central1/functions/pairing.

I've tried to get this to work, and I've changed a bunch of things so far without success.

Honestly, it looks like someone from this project should try going through this process themselves, although I will keep trying, but I will have trouble producing accurate instructions with all the flailing around I'm doing.

Also, it's a little troubling that I have to turn on billing, given that the instructions have us using an anonymous endpoint, so if we could not do that (it looks like billing is required for functions, so this probably means not using an anonymous account), that would probably be good.

@Rayapati-Tejasree
Copy link
Author

i'm facing the same issue, were you able to solve it?

Hi! Sry for the delay, I'm not working on it anymore after that. But it asked for billing in firebase functions. I did changes in base code itself according to me where I managed to run the application but still I couldn't pair the devices.

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

No branches or pull requests

4 participants