Unable to deploy Firebase - Error: Invalid Firebase specified

After completing all the necessary steps on firebase.com/docs and upgrading my application to a newer version, I still cannot launch the deployment using firebase-tools .

$ firebase deploy MY_APP_NAME

Gives the following stack:

 /usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:53 throw err; ^ Error: EACCES: permission denied, open '/Users/myusername/.config/configstore/update-notifier-firebase-tools.json' You don't have access to this file. at Error (native) at Object.fs.openSync (fs.js:634:18) at Object.fs.readFileSync (fs.js:502:33) at Object.create.all.get (/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:34:26) at Object.Configstore (/usr/local/lib/node_modules/firebase-tools/node_modules/configstore/index.js:27:44) at new UpdateNotifier (/usr/local/lib/node_modules/firebase-tools/node_modules/update-notifier/index.js:34:17) at module.exports (/usr/local/lib/node_modules/firebase-tools/node_modules/update-notifier/index.js:123:23) at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/bin/firebase:5:48) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) 

Reading this Unable to deploy to firebase. Get ENOENT error I tried to apply sudo, which helped a bit more - and the following: $ sudo firebase deploy

after a noticeable pause of 3-5 seconds leads to

 Error: Invalid Firebase specified. Having trouble? Try firebase deploy --help 

Execution however: $ sudo firebase list

shows that the project exists:

 ┌────────────────────────â”Ŧ───────────────────────â”Ŧ─────────────┐ │ Name │ Project ID / Instance │ Permissions │ ├────────────────────────â”ŧ───────────────────────â”ŧ─────────────┤ │ MY_APP_NAME (current) │ MY_APP_NAME │ Owner 

Any ideas would be appreciated.

I have NPM 3.8.6 @ Node v6.0.0 @Mac 10.11

+6
source share
3 answers

First, fixing a permission error is pretty simple:

 sudo chown -R $USER ~/.config/configstore 

Then to deploy the team

 firebase deploy --project MY_PROJECT_ID 

Where MY_PROJECT_ID is the first entry in the "Project / Instance Identifier" column of the firebase list table. Run the firebase use --help command to set the default project for the directory

+8
source

As Chris Raynor said, first fix your resolution problem:

 sudo chown -R $USER ~/.config/configstore 

My update led to the same error ("Invalid Firebase specified"). I found that cleaning and re-adding a project solves my problem.

I executed the commands below after upgrading to a new version of firebase and after the initial interactive process.

 firebase use --clear firebase use --add 

The add option gave me the following interactive hints:

 ? Which project do you want to add? my-project-name ? What alias do you want to use for this project? (eg staging) staging 

After cleaning and re-adding, my deployment team worked according to the documentation

 firebase deploy 

The final working output looked like this:

 i deploying database, hosting i hosting: preparing public directory for upload... ✔ hosting: 34 files uploaded successfully i starting release process (may take several minutes)... ✔ Deploy complete! 
+5
source

I encountered the same problem ( Invalid Firebase Specified ) when I imported a project from the old Firebase panel into my new console and fixed it using the following terminal commands,

firebase use --clear
// Clear any previous project selection for firebase tools

firebase use --add
// Add a newly imported project with a new alias

After cleaning and re-adding the project with an alias, I was able to execute it successfully using

firebase deploy .

+3
source

All Articles