Firebase Deploy: Error: Could not detect language for functions at

Viewed 2087

I'm trying to deploy my firebase project, but Im getting the following error:

=== Deploying to 'my-proj'...

deploying firestore, functions, hosting

cloud.firestore: checking firestore.rules for compilation errors...

[W] undefined:undefined - Ruleset uses old version (version [1]). Please update to the latest version (version [2]).

cloud.firestore: rules file firestore.rules compiled successfully

Error: Could not detect language for functions at

any thoughts?

4 Answers

In my case, I missed functions init:

firebase init functions

documentation

In my case I use firebase deploy --only hosting command

I can't tell what else is perhaps going wrong with your code, but I also had an error that looked like this part:

[W] undefined:undefined - Ruleset uses old version (version [1]). Please update to the latest version (version [2]).

Some of your firebase rules are written using version 1. You may need to go in and add

rules_version = '2';

to the top of your firebase rule set, specifically for Firebase Firestore. You can do this in the firebase console, or in the firestore.rules in your project - which may be a newly generated file in your project.

Please update your rule to version 2 as the error message says.

Related