2017-08-10 70 views
0

我正尝试将项目上传到Firebase主机。我最近重新安装了macOS Sierra,因此全新安装了Node和Firebase工具。Firebase部署挂起在终端中

不过,我跑firebase deploy --debug

[2017-08-10T21:54:40.043Z] -------------------------------------------- 
-------------------------- 
[2017-08-10T21:54:40.046Z] Command:  
/usr/local/bin/node/usr/local/bin/firebase deploy --debug 
[2017-08-10T21:54:40.047Z] CLI Version: 3.9.2 
[2017-08-10T21:54:40.047Z] Platform:  darwin 
[2017-08-10T21:54:40.047Z] Node Version: v8.3.0 
[2017-08-10T21:54:40.048Z] Time:   Thu Aug 10 2017 16:54:40 GMT- 
0500 (CDT) 
[2017-08-10T21:54:40.048Z] -------------------------------------------- 
-------------------------- 

[2017-08-10T21:54:40.058Z] > command requires scope:["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform”][2017-08-10T21:54:40.059Z] > authorizing via signed-in user 
[2017-08-10T21:54:40.061Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/dornfeld-design 
Thu Aug 10 2017 16:54:40 GMT-0500 (CDT) 
[2017-08-10T21:54:40.471Z] <<< HTTP RESPONSE 200 server=nginx, date=Thu, 10 Aug 2017 21:54:40 GMT, content-type=application/json; charset=utf-8, content-length=121, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store 
[2017-08-10T21:54:40.472Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/name-of-project/tokens 
Thu Aug 10 2017 16:54:40 GMT-0500 (CDT) 
[2017-08-10T21:54:41.061Z] <<< HTTP RESPONSE 200 server=nginx, date=Thu, 10 Aug 2017 21:54:40 GMT, content-type=application/json; charset=utf-8, content-length=429, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store 

时请告诉我最好的方式向前行进得到下面的错误?我曾尝试用3个不同版本的节点重新安装firebase-tools

附加注释:

  1. 必须安装firebase-tools--unsafe-perm命令得到它的安装。
  2. firebase init不仅创造.firebaserc文件和文件firebase.json{}
  3. 手动创建的firebase.json文件适当的公共文件夹等
+0

您试过'firebase登录'吗? –

+0

是的,我在每次安装尝试后都注销并重新登录。 – KVNA

+0

你在代理或公司防火墙后面吗? –

回答

0

所采取的步骤来纠正问题

  1. 卸载节点cd /usr/local/lib sudo rm -rf node_modules

  2. 安装自制/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  3. 安装纱brew install yarn

  4. 安装火力地堡CLI yarn add firebase-tools

  5. 转到项目文件夹,firebase loginfirebase init
    一个。 init正确创建.firebaserc文件
    b。 firebase.json还是空白,即{}

  6. 手动创建firebase.json

    { 
        "hosting": { 
        "public": "build/unbundled", 
        "ignore": [ 
         "firebase.json", 
         "**/.*", 
         "**/node_modules/**" 
        ], 
        "rewrites": [{ 
        "source": "**", 
        "destination": "/index.html" 
        }] 
        } 
    } 
    
  7. firebase deploy现在正常工作。

+0

必须用Node而不是Yarn来安装'''polymer-cli'',才能正常工作。 – KVNA