shershen shershen - 1 year ago 667
Node.js Question

Unable to do Firebase deploy - Error: Invalid Firebase specified

After accomplishing all the necessary steps on and upgrading my app to newer version I still can't run the deploy it using


$ firebase deploy MY_APP_NAME

Gives following stack:

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 Can't deploy to firebase . Get ENOENT error I've tried to apply sudo, that helped a bit more - and following: $ sudo firebase deploy

after a noticeable pause of 3-5 seconds results in

Error: Invalid Firebase specified.

Having trouble? Try firebase deploy --help

However doing: $ sudo firebase list

shows that the project exists:

│ Name │ Project ID / Instance │ Permissions │
│ MY_APP_NAME (current) │ MY_APP_NAME │ Owner

Any ideas will be appreciated.

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

Answer Source

First off, fixing your permissions error is fairly simple:

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

Then, to deploy the command is

firebase deploy --project MY_PROJECT_ID

Where MY_PROJECT_ID is the first entry in the 'Project ID / Instance' column of the firebase list table. Check out firebase use --help command to set the default project for a directory

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download