Firebase托管在部署angular 6应用程序后显示欢迎页面吗? [英] Firebase hosting showing welcome page after deploying angular 6 app?

查看:102
本文介绍了Firebase托管在部署angular 6应用程序后显示欢迎页面吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发angular 6应用程序,但是在部署firebase之后仅显示欢迎页面.

I want to develop the angular 6 apps, but after deploying firebase showing only welcome page.

这是我已部署的步骤.

  1. 已安装firebase-tools
  2. ng build --prod(在我的应用中)
  3. firebase初始化
  4. 您准备好进行了吗? (是/否)y
  5. (*)托管:配置和部署Firebase托管站点
  6. 您要将什么用作公用目录? (公共)dist
  7. 配置为单页应用程序(将所有URL重写为/index.html)? (y/N)y
  8. 文件dist/index.html已经存在.覆盖? (y/N)y
  9. Firebase初始化完成!
  10. 在此步骤中,我已删除dist文件夹并再次运行ng build --prod
  11. dist目录内的子文件夹中的
  12. angular构建应用程序,因此我将包含index.html的子目录中的所有内容复制到了dist/.
  13. firebase部署
  14. firebase开放主机:站点
  1. installed firebase-tools
  2. ng build --prod (in my app)
  3. firebase init
  4. Are you ready to proceed? (Y/n) y
  5. (*) Hosting: Configure and deploy Firebase Hosting sites
  6. What do you want to use as your public directory? (public) dist
  7. Configure as a single-page app (rewrite all urls to /index.html)? (y/N) y
  8. File dist/index.html already exists. Overwrite? (y/N) y
  9. Firebase initialization complete!
  10. In this step, I have deleted dist folder and run ng build --prod again
  11. angular build app in a subfolder inside dist directory hence I copied all the content from the subdirectory which contains index.html to dist/.
  12. firebase deploy
  13. firebase open hosting:site

但是做完所有这些之后,我仍然在链接中获得欢迎页面.

but after doing all that I am still getting welcome page in the link.

我在做什么错!!

推荐答案

尝试: 8.文件dist/index.html已经存在.覆盖? (y/N)N 并以隐身模式打开指向您应用的链接.严重的是,我坚持了几个小时,因为此Firebase索引已缓存在我的情况下,所以这就是为什么部署后看不到我的应用程序的原因.

Try: 8. File dist/index.html already exists. Overwrite? (y/N) N and open link to your app in incognito mode. Seriously, I stuck for hours because this firebase index got cached in my case, so this was the reason why I could't see my app after deploy.

这篇关于Firebase托管在部署angular 6应用程序后显示欢迎页面吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆