I am attempting to deploy my React.js project to a secondary dev
hosting site on Firebase, but I am getting Error: Task ab14... failed: retries exhausted after 6 attempts
after running the command firebase deploy --only hosting:dev
.
As I have done successfully on another project, I setup hosting by running: firebase target:apply hosting dev dev-sitename-com
then firebase target:apply hosting live live-sitename-com
to apply each site. Then I change firebase.json
from
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
],
"source": "functions"
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
}
}
TO
{
"hosting": [
{
"target": "live",
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
{
"target": "dev",
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
],
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint"
],
"source": "functions"
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
}
}
I've deleted node_modules and reinstalled. I've deleted the build folder and rebuilt. I've tried setting GENERATE_SOURCEMAP from false to true. I can still deploy to the live
target, but not dev
, which should be indicative of the issue. Looks like some others with the same issue had the issue resolve over a few hours as it was on firebase's side, but I doubt is the issue because live will deploy. From the logs it looks like the deploy is getting stuck on uploading the last 2 files. The logs also indicate The "path" argument must be of type string. Received type undefined at validateString (internal/validators.js:107:11)
, which isn't directing anywhere in my code. Any ideas on how to fix this?
Here are the logs for --debug when deploying: https://pastebin.com/xhPZFnzr