I'm trying to set a target deploy for Firebase Functions. https://firebase.google.com/docs/cli/targets
This is the firebase.json file
{
"functions": [{
"target": "production",
"source": "src/prod/functions",
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
}]
}
The predeploy runs normally but when deploying gets an error
functions[prod]: Finished running predeploy script.
Error: An unexpected error has occurred.
If I go to firebase-debug.log it shows:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
Putting the Functions folder on the project root it will deploy normally.
What is missing here?