After initiating my firebase app with
firebase init
I tried to deploy it with
firebase deploy
but I get this error
=== Deploying to 'fugis-auto-services-website'...
i deploying database, storage, functions, hosting
Error: An unexpected error has occurred.
So I looked at the firebase-debug.log and this is what it says
Tue May 01 2018 19:52:19 GMT-0500 (CDT)
[debug] [2018-05-02T00:52:19.967Z] <<< HTTP RESPONSE 200
[info]
[info] === Deploying to 'fugis-auto-services-website'...
[info]
[info] i deploying database, storage, functions, hosting
[debug] [2018-05-02T00:52:20.266Z] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at Object.join (path.js:1157:7)
at Config.path (/Users/vanessaflores/.nvm/versions/node/v10.0.0/lib/node_modules/firebase-tools/lib/config.js:166:37)
at /Users/vanessaflores/.nvm/versions/node/v10.0.0/lib/node_modules/firebase-tools/lib/deploy/lifecycleHooks.js:68:38
at _chain (/Users/vanessaflores/.nvm/versions/node/v10.0.0/lib/node_modules/firebase-tools/lib/deploy/index.js:26:38)
at /Users/vanessaflores/.nvm/versions/node/v10.0.0/lib/node_modules/firebase-tools/lib/deploy/index.js:29:14
at process._tickCallback (internal/process/next_tick.js:178:7)
[error]
[error] Error: An unexpected error has occurred.
I'm not sure how to proceed.
I was able to fix this by re-initializing firebase functions:
firebase init functions
You might want to first update your firebase-tools:
npm install -g firebase-tools
and backup your existing functions directory.
Too late to answer but might help someone in future, I had the same issue, i added the public folder as mentioned by @Gleb and inside your firebase.json you need to specify the public folder as well, like so:
{
"hosting": {
"public": "public",
"rewrites": [
{
"source": "**",
"function": "helloWorld"
}
]
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With