Firebase部署提供了“路径"错误 [英] firebase deploy gives a "path" error
本文介绍了Firebase部署提供了“路径"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用
firebase init
我尝试使用
firebase deploy
但我收到此错误
=== Deploying to 'fugis-auto-services-website'...
i deploying database, storage, functions, hosting
Error: An unexpected error has occurred.
所以我查看了firebase-debug.log,这就是它的意思
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.
我不确定该如何进行.
推荐答案
回答得太迟了,但将来可能会对某人有所帮助,我遇到了同样的问题,我在@ firefox.json中添加了@Gleb提到的公用文件夹.您还需要指定公用文件夹,如下所示:
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"
}
]
}
}
这篇关于Firebase部署提供了“路径"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文