Local deploy failure for functions: Cannot understand what targets to deploy
See original GitHub issue[REQUIRED] Environment info
firebase-tools: : 8.4.2
Platform: : Windows 10
[REQUIRED] Test case
firebase serve --only functions Result: Cannot understand what targets to deploy. Check that you specified valid targets if you used the --only or --except flag. Otherwise, check your firebase.json to ensure that your project is initialized for the desired features.
[REQUIRED] Steps to reproduce
Initialize a firebase project using the command firebase init
and then select all and select javascript and yes for the options. After the initialization is completed and npm install is done then do firebase serve --only hosting,functions
this will fail but firebase serve --only hosting
working and on deploying the project with firebase deploy
the hosted url for the function returns
Error: Forbidden
Your client does not have permission to get URL /app/timestamp from this server.
[REQUIRED] Expected behavior
function should return the result or else a valid error should be returned.
[REQUIRED] Actual behavior
function serve is not working Error: Cannot understand what targets to deploy. Check that you specified valid targets if you used the --only or --except flag. Otherwise, check your firebase.json to ensure that your project is initialized for the desired features.
Attachment: firebase.json
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Fixed in https://github.com/firebase/firebase-tools/pull/2369
@MisterSingh I’ll send a PR to improve this error message.