-
Notifications
You must be signed in to change notification settings - Fork 992
Error: Hosting target (project-name) not detected in firebase.json #2731
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
Comments
I am able to replicate this with |
Question for you @pflevy - on Do you have those targets set up and are you using the correct name? I can poke around a bit more, but specifically doing |
Same issue here with 8.13~ I use ludufre@iMac ludufre % npm i -g [email protected]
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
/Users/ludufre/.npm-packages/bin/firebase -> /Users/ludufre/.npm-packages/lib/node_modules/firebase-tools/lib/bin/firebase.js
+ [email protected]
updated 1 package in 26.881s
ludufre@iMac ludufre % firebase deploy --only hosting:x-x-x
=== Deploying to 'x-x'...
i deploying hosting
Error: Hosting target x-x-x not detected in firebase.json When rollback to 8.12: ludufre@iMac ludufre % npm i -g [email protected]
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
/Users/ludufre/.npm-packages/bin/firebase -> /Users/ludufre/.npm-packages/lib/node_modules/firebase-tools/lib/bin/firebase.js
+ [email protected]
updated 1 package in 7.532s
ludufre@iMac ludufre % firebase deploy --only hosting:x-x-web
=== Deploying to 'x-x'...
i deploying hosting
i hosting[x-x-x]: beginning deploy...
i hosting[x-x-x]: found 311 files in platforms/browser/www
✔ hosting[x-x-x]: file upload complete
i hosting[x-x-x]: finalizing version...
✔ hosting[x-x-x]: version finalized
i hosting[x-x-x]: releasing new version...
✔ hosting[x-x-x]: release complete
✔ Deploy complete!
Project Console: https://console.firebase.google.com/project/x-x/overview
Hosting URL: https://x-x-x.x.x
ludufre@iMac ludufre % |
I've had this same problem start happening from last night.
I now get the error:
Nothing else has changed on this project or CI defintion for months |
Same here... since two days |
Same here. I've always used |
In this specific case, I only use one site and I don't have the target set up on firebase.json. I actually tried adding it as Also, I do have another project where I rely on the same action and make use of two sites. But I also don't have the 'target' set on firebase.json and only pass it as a flag From what you just said I assume the correct approach would be to use |
Worked for me, this way (specific firebase-tools version 8.12):
Then:
|
Ack. Thanks everyone for the insights. If we regressed this behavior, makes sense to me that we should restore it. I'll look into it this morning. |
I was presented with the same problem and using an older version of firebase-tools solved the problem. Thanks for your comments. Greetings. |
@bkendall How should hosting be specified until a fix is up? |
Having same issue on local windows machine. I was on an older version of firebase-tools (probably 7... something) then upgraded and that didn't fix the issue. Then installed version 8.12, added the "site" property to my firebase.json file and then deployed as usual with "firebase deploy --only hosting:SITENAME" |
|
works for me as well |
I get the same issue with no changes to firebase config |
I also get the same issue with the latest version of firebase when installed using Using [email protected] fixed the issue for me as well. |
This will go out in the next release of firebase tools. Thanks for your patience. |
Having the same issue... |
Same problem since 3 days using : Error: Hosting target SITE_NAME not detected in firebase.json |
Follow https://firebase.google.com/docs/hosting/multisites#set_up_deploy_targets TL;DR
it solved the problem for me with multiple sites in one hosting project |
This should be fixed in |
I had the same problem: Hosting target (project-name) not detected in firebase.json I looked at .firabaserc and get the target name
Then, I ran |
I tried the Angular tutorial from https://angular.io/start and then tried to deploy it from my local copy to Firebase but I also needed to specify the target as @RoCampos said. And I'm using version 8.18.0, any idea why this is still happening? |
@SonicWim if you could open a new issue with more details, that would be super helpful. Please include all the relevant parts of |
I will do that. I'll see if I can reproduce the error tomorrow. |
As I'm a noob on Github I could not find back this thread after posting my message so I could also not let you know that my problem is solved, it was a because I misinterpreted an instruction (about the default project name) off the tutorial. Tips on navigating to your posts would be appreciated... ;-) And I only found this page back because I got a mail today of someone saying happy new year but this seems to be removed already. |
Yeah the Happy new year message confused me a lot |
Is there a way, @usamedin, to see your forum activity? I can't seem to find it... |
@SonicWim try https://github.com/notifications/subscriptions, when you comment on a thread you are auto-subscribed to it |
Thanks for the tip man! I only got notifications about new posts by mail and that's fine but here I wanted to reply back to say that my problem was not really a problem at all but a PEBKAC but I could not find the issue thread any more... 😄 |
Has this ever been fixed? |
only open the directory and open firebase.json and add "site": "site-name" below the second line "hosting" |
I ended up here because I hadn't followed the full procedure for setting up multi-site hosting. This url had all the info I needed: https://firebase.google.com/docs/hosting/multisites I needed to run |
Found it! Follow steps here - https://firebase.google.com/docs/cli/targets
|
Ami me funciono cerrando sesión con el comando "firebase logout" y volver a iniciar sesión con "firebase login", esto refresca los CLI de recopilación de información, después le hice el despliegue normal sin generar el error "Error: Cannot deploy a web framework from source because the experiment webframeworks is not enabled. To enable webframeworks run firebase experiments:enable webframeworks". Comparto pasos para los que le funcione: |
Try the following version |
[REQUIRED] Environment info
**firebase-tools:**v8.13.1
**Platform:**macOS
[REQUIRED] Test case
firebase deploy --only hosting:(project-name)
[REQUIRED] Steps to reproduce
I'm using the following Github action: https://github.com/w9jds/firebase-action/ which uses the latest release of firebase-tools.
Since the last update, it's not working anymore. I had to manually set to an older version of firebase-tools (I went for v8.12.1, I haven't tried with v8.13.0)
[REQUIRED] Expected behavior
Successful deploy
[REQUIRED] Actual behavior
Deploy error
Error: Hosting target (project-name) not detected in firebase.json
The text was updated successfully, but these errors were encountered: