I can't make the CLI firebase deploy rules work.
I have a file called security.rules at the root level of my firebase project directory.
In CLI, I type:
firebase deploy --only firestore:rules
Then I get this response in the CLI:
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.
What I tried:
I tried going into my firebase.json and adding the rules option.
Before:
{
"functions": {
"predeploy": [
//"npm --prefix \"$RESOURCE_DIR\" run lint"
],
"source": "functions"
}
}
After:
{
"functions": {
"predeploy": [
//"npm --prefix \"$RESOURCE_DIR\" run lint"
],
"source": "functions"
},
"rules": "security.rules"
}
And I got the same problem... Any ideas?