I'm using firebase hosting and when I try to deploy my project, I get the following error:
The firebase log says the following:
[debug] [2020-05-03T14:31:51.377Z] TypeError: Cannot read property 'deploys' of undefined at C:\Users\albert.valeta\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\index.js:84:36 at process._tickCallback (internal/process/next_tick.js:68:7)
The command I'm using is:
firebase deploy --only hosting:last-call-manager-pre
The firebase.json is:
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
The weird thing is that when I add the site property to the firebase.json is doesn't throw any error and completes the deploy. That firebase.json looks like:
{
"hosting": {
"site": "last-call-manager-pre",
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
I care about the error because I have 2 different environments and I don't want to modify the firebase.json file everytime I want to deploy for each targetted environment. Besides, I don't know exactly the meaning of this site attribite and didn't found too much information about it.
Could someone help me solve this issue?
