I am trying to upload a project to Firebase hosting. I recently reinstalled macOS Sierra, so have fresh installs of Node and firebase-tools.
However, I get the following error when running 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
Whats the best way to proceed forward? I have tried reinstalling firebase-tools
with 3 different versions of Node.
Additional comments:
firebase-tools
with --unsafe-perm
command to get it to install.firebase init
only created .firebaserc
file and a firebase.json
file with {}
firebase.json
file with proper public folder, etc.Steps taken to correct problem
Uninstall Node cd /usr/local/lib
sudo rm -rf node_modules
Install Homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Yarn brew install yarn
Install Firebase CLI yarn add firebase-tools
Go to project folder, firebase login
, firebase init
a. init
creates .firebaserc
file correctly
b. firebase.json
still blank, i.e. {}
Create firebase.json
manually:
{
"hosting": {
"public": "build/unbundled",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [{
"source": "**",
"destination": "/index.html"
}]
}
}
firebase deploy
now works properly.