2017-03-07 64 views
0

我試圖將我的angular 2項目部署到firebase。我成功了第一次,但之後,即使項目部署到firebase,它並沒有顯示在url(它只是顯示firebase託管的歡迎頁面) 我也注意到,即使我已經導航到dist文件夾(在ng build操作後創建)firebase init仍然在父目錄中運行,這可能會導致問題。如何解決這個問題?無法在正確的目錄中初始化Firebase

Windows PowerShell 
Copyright (C) 2016 Microsoft Corporation. All rights reserved. 

PS C:\Users\BEN> e: 
PS E:\> cd project\angular-proj 
PS E:\project\angular-proj> 
PS E:\project\angular-proj> cd dist 
PS E:\project\angular-proj\dist> firebase init 

    ######## #### ######## ######## ########  ###  ###### ######## 
    ##  ## ##  ## ##  ##  ## ## ## ##  ## 
    ###### ## ######## ###### ######## ######### ###### ###### 
    ##  ## ## ## ##  ##  ## ##  ##  ## ## 
    ##  #### ##  ## ######## ######## ##  ## ###### ######## 

You're about to initialize a Firebase project in this directory: 

    E:\project\angular-proj   

Before we get started, keep in mind: 

    * You are initializing in an existing Firebase project directory 

? Are you ready to proceed? (Y/n) n 

回答

0

我已經設法找到問題的根源。在構建應用程序時,我輸入了'ng build -prod'而不是'ng build --prod'。現在問題解決了。