Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase CLI: database:set keeps complaining about 'Path must begin with /'

According to the CLI docs and its own help command, I just need to pass it the path (which I assume is the path on the project), my json file, and any options. So this is what I do (while I'm in the folder containing the json data):

firebase database:set --project MyProject / myJsonData.json

where I want / to be the root of my project, I want to wipe out existing data and replace it with the data in myJsonData.json. However whenever I run this, even with changing parameter order, or putting the / in quotes, it tells me Error: Path must begin with /. The path is /, so I don't know what it's complaining about. There's no examples of this command in use, so I don't know what it's expecting...

like image 231
IronWaffleMan Avatar asked Nov 05 '16 22:11

IronWaffleMan


People also ask

Where is my Firebase json file?

Firebase automatically creates your firebase. json file at the root of your project directory when you run the firebase init command.

How do I change the realtime rule in Firebase?

Edit and update your rulesOpen the Firebase console and select your project. Then, select Realtime Database, Cloud Firestore or Storage from the product navigation, then click Rules to navigate to the Rules editor. Edit your rules directly in the editor.

What is Firebase CLI?

The Firebase CLI is a utility used to administer Firebase projects and perform tasks such as Realtime Database management tasks from the command-line of a terminal or command-prompt window. The Firebase CLI is also the method by which Firebase Cloud Functions are deployed and managed.

How install VS code in Firebase?

Open VSCode, and then select File > Open (Open Folder on Windows) from the menu bar. Create the folder where you want your project to exist, and then open that folder. to ensure that node was installed correctly. and the package will install (you may need to run with sudo or as an Administrator on Windows).


1 Answers

Turns out the answer is to put // as the path. Now I get an Unexpected error while setting data, but that's another issue.

like image 169
IronWaffleMan Avatar answered Oct 01 '22 14:10

IronWaffleMan