我正在尝试将我的网络应用托管在 Firebase 中。我跑了:
webdev build --output build
,firebase init
和firebase deploy
,但是我收到一条错误消息:
Error: There was an issue preparing Hosting files for upload.
所以我跑了firebase deploy --debug
。错误消息是:
i hosting: preparing build/web directory for upload...
[2018-08-11T14:30:25.054Z] Error: ELOOP: too many symbolic links encountered, stat 'C:\Users\marco\MyWebApp\WEB\WEBSITE
- Copia\build\web\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages\packages'
Error: There was an issue preparing Hosting files for upload.
如何解决此错误?
(如果我运行firebase serve
,它可以工作)。
非常感谢您!
答案 0 :(得分:1)
如this answer中所述,请确保在firebase.json
文件中将hosting.public
字段设置为"build/web"
:
{
"hosting": { "public": "build/web" }
}
目前似乎有一个issue with webdev builds(除非是firebase问题)。无论如何,作为一种解决方法,我发现删除导致循环(build/packages/packages
)的符号链接为我解决了这个问题。
在项目的根目录中,每次都运行此命令,然后重新运行 webdev build -o build
:
rm build/packages/packages
此后firebase serve
和firebase deploy
都为我工作。