question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
samtsterncommented, Jun 16, 2020
1reaction
samtsterncommented, Jun 16, 2020

@MisterSingh I’ll send a PR to improve this error message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase cannot understand what targets to deploy
$ firebase deploy --only functions Error: Cannot understand what targets to deploy. Check that you specified valid targets if you used the -- ......
Read more >
Deploy targets | Firebase Documentation - Google
Configure your firebase.json file to use deploy targets; Manage deploy targets; Test locally before deploying; Deploy specific Firebase resources.
Read more >
No targets in firebase.json match "--only hosting"
0, I am getting the following error: Error: Cannot understand what targets to deploy/serve. No targets in firebase.json match '--only hosting'.
Read more >
Working with the CodeDeploy agent - AWS Documentation
Learn about the CodeDeploy agent, a software package that enables an instance to be used in CodeDeploy deployments.
Read more >
Deployment targets - Octopus Deploy
db-server. Using target roles means the infrastructure in each of your environments doesn't need to be identical and the deployment process will know...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found