Firebase和AngularDart。错误:准备托管文件以进行上传时出现问题

时间:2018-08-11 14:38:28

标签: firebase dart angular-dart firebase-hosting

我正在尝试将我的网络应用托管在 Firebase 中。我跑了:

  1. webdev build --output build
  2. firebase init
  3. 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,它可以工作)。

非常感谢您!

1 个答案:

答案 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 servefirebase deploy都为我工作。