Reputation: 2680
When I run firebase deploy
, only my functions are deployed, but not my hosting.
=== Deploying to 'project1'...
i deploying functions
i functions: ensuring necessary APIs are enabled...
✔ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
i functions: packaged functions (36.04 KB) for uploading
✔ functions: functions folder uploaded successfully
i functions: updating Node.js 6 function exampleFn1(us-central1)...
✔ functions[exampleFn1(us-central1)]: Successful update operation.
✔ Deploy complete!
I thought it was an issue with build so ran yarn build
, but hosting is still not being deployed.
On the Firebase console Hosting's release history section, it also shows latest deployment as January:
Any thoughts on why my React app is not being deployed? I've deployed it before and just made some front end and function changes.
(edit)
After running firebase init
> hosting again which produced by firebase.json file, the deployment went through! But the deployed version is not the same version as yarn serve
or even firebase serve
serves up. Why is this?
=== Deploying to 'project1'...
i deploying hosting
...
✔ Deploy complete!
Upvotes: 1
Views: 887
Reputation: 169
I think you need to modify firebase.json files and then provide the correct hosting parameters for example:-
"hosting": {
**"public": "www",**
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
**"source": "**",
"destination": "/index.html"**
}
]
}
Now change "public":"www" to "public":your dist folder name and then perform firebase deploy.
Upvotes: 1