Could not detect language for functions at functions
507
I came across this issue with a custom build process and pointing only to my dist
folder.
There are three requirements for a successful build:
- a
firebase.json
withfunctions.source
pointing to a directory containing apackage.json
- The
package.json
containing a"main":"path-to-index.js"
field. - A node engine specified in either the
package.json
orfirebase.json
//firebase.json
{
"functions": {
"source": "./some-dir"
}
}
//some-dir/package.json
{
"main": "lib/index.js",
"engines": {
"node": "16"
}
}
Author by
Roman Soviak
When I was a child I played football for my village. I believe in the piece all over the world. I like to develop programs and in love with Android OS. I learn programming for myself with my friends. We stand around books, speak with each other, sing songs about life and develop programs.
Updated on January 01, 2023Comments
-
Roman Soviak 10 months
After firebase deploy in flutter web I get this error:
In this answer person recommends firebase init, but I already have Firebase in the app. Thanks for any ideas!
-
Peter Koltai about 2 yearsCan you add the contents of
package.json
fromfunctions
folder? -
Roman Soviak about 2 years
{ "dependencies": { "languagedetect": "^2.0.0" } }
@PeterKoltai -
Peter Koltai about 2 yearsOn Firebase Functions init, the
package.json
gets populated with settings likeengines
, dependencies forfirebase-functions
etc., do you have these as well? -
Roman Soviak about 2 years@PeterKoltai I fixed it by using this answer
-
Roman Soviak about 2 years@PeterKoltai How can I get this info from functions from my Firebase?
-
Roman Soviak about 2 years@PeterKoltai functions were written by hand and I don't use it in my flutter web app
-
Peter Koltai about 2 yearsIf you want to use Firebase Functions, then you have to initialize it with
firebase init functions
, which createsfunctions
folder with necessary files. -
Peter Koltai about 2 yearsIf you don't use, then you should not deploy functions.
-
Peter Koltai about 2 years(Funny thing here: you have
languagedetect
package, but the error message is not about this, but because it can't detect the programming language of functions.)
-