"Error: Permission denied" when starting firebase init and selecting a database

So, I am testing the CLI today firebase initwith the selected db / hosting and, choosing to create a new project, it always says Error: Permission denied..

sudo firebase init did not help.

firebase-toolsversion 3.0.3in OS X 10.11.5.

firebase init

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

  /Users/splaktar/Git/tmp

Before we get started, keep in mind:

  * You are initializing in an existing Firebase project directory

? What Firebase CLI features do you want to setup for this folder? Database: Deploy Firebase Realtime Database Rules

=== Project Setup

First, let associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add, 
but for now we'll just set up a default project.

? What Firebase project do you want to associate as default? [don't setup a default project]

=== Database Setup

Firebase Realtime Database Rules allow you to define how your data should be
structured and when your data can be read from and written to.

? What file should be used for Database Rules? database.rules.json

Error: Permission denied.

I tried the answers here , but they did not help. Is this just a mistake in firebase-tools?

+4
source share
3 answers

I have the same problem and I fixed it.

  • run firebase init
  • Cancel selection ❯◯ Database: Deploy Firebase Realtime Database Rules
  • Follow the other steps to configure the original application, choosing the default for each of them should work fine.
  • run firebase serve

Hope this helps.

+2
source

, . " firebase" ( ), . .

+1

Sometimes this can happen when a file exists .firebaserc.

Delete the file .firebasercand try again firebase init.

+1
source

All Articles