How to export data from firestore using vscode - visual-studio-code

I want to export data from firestore.
I tried running the following code.
firebase firestore:export data.json
Tried multiple things and still can get an output file with the data in my database.
Error: firestore:export is not a Firebase command
To fix the error I uninstall the :
npm uninstall -g firebase-tools
npm cache clean --force
Then I run
firebase --version, which is really up to date.

You're confusing two separate command line tools:
gcloud from the Google Cloud Platform
firebase from Firebase
The firestore export command is only present in the gcloud CLI, and documented here and here. There is no equivalent command in the Firebase CLI, for which the options are documented here.

Related

flutterfire configure not working even after installing via npm, and relogging

I keep getting this error no matter what I attempt to do,
I've already tried using "npm install -g firebase-tools",
and "firebase projects:list" displays a correct list of my current projects.
Looking for help as I have sunk countless hours into this problem without being able to move a step forward.
FirebaseCommandException: An error occured on the
Firebase CLI when attempting to run a command.
COMMAND: firebase --version
ERROR: The FlutterFire CLI currently requires the official Firebase CLI to also be installed, see https://firebase.google.com/docs/cli#install_the_firebase_cli for how to install it. ```
In case you have installed (and renamed) firebase.exe from the windows installer, remove that first.
The installation of npm install -g firebase-tools and the windows installer are conflicting with each other.
Then go through firebase logout and firebase login again before running flutterfire configure.
I added the firebase-tools file downloaded from https://firebase.tools/bin/win/instant/latest in the root of the directory of my project and it works for me. I changed the name to firebase only.

Unable to add filesystem permission denied

Using node v 8.9.0 and this tutorial
When I try and debug my http google cloud function in dev tools:
C:_Users_Matt_AppData_Roaming_nvm_v8.9.0_node_modules_#google-cloud_functions-emulator_src_supervis
I get filesystem permission denied error, how can I debug my cloud functions:
I also got the filesystem permission denied error, and the issue was that you need to accept the premissions from chrome to be able to access that filesystem. initially I didn't see the premissions prompt, but then I found it on a different tab (which was kinda weird behavior). I guess just look for that permissions prompt, it should be right below your address bar.
I see that you are referring to a C directory, which means that you are trying this on Windows OS. I will put the steps below with documentation links on how to properly setup the configuration. Those steps worked for me well without giving me any issues, so I suggest you to follow them one by one and see if that helps you.
Run Google Cloud Functions Emulator on Windows OS:
Install and set up Google Cloud SDK for Windows. Link and documentation here
Install Node.js and npm for Windows. Tutorial here
Right click on Google Cloud SDK Shell and select Run as administrator.
Execute $ node --version you should get the version of Node.js without any additional errors
Execute $ npm --version you should get the version of npm without any additional errors
The tutorial that you are referring to is part of Google Cloud Functions Tutorial Series
First install and set up npm functions emulator by running $ npm install -g #google-cloud/functions-emulator as mentioned in Google Cloud Functions Tutorial : Setting up a Local Development Environment
Setup the project for the functions $ functions config set projectId PROJECT_ID as mentioned in Start and Stop the Emulator documentation.
Start the emulator by executing $ functions start. Same documentation as above.
Download the source code as mentioned in the documentation you are referring to. The GitHub repository is here.
Clone the project locally. $ git clone https://github.com/rominirani/googlecloudfunctions-training.git
Navigate to the folder $ cd googlecloudfunctions-training/helloworld-http
Follow the rest of the Google Cloud Functions Tutorial : Debugging Local Functions documentation.
NOTE: Whenever you run / execute / call the Cloud Function the Node.js
blank window will pop up. Keep it open as it is the executable that
executes your code.
I have tested the tutorial with the above set up that I described and it worked for me. You have to be the administrator of your account, since the Functions Emulator and the code is running locally, so you have to have all the permissions of the directories that are going to be used and execute all the software as administrator.

gcloud dataproc clusters create: No module named jsonschema

When trying to create a new cluster with gcloud dataproc clusters create, the following error is displayed:
ERROR: gcloud failed to load (gcloud.dataproc.clusters.create): Problem loading gcloud.dataproc.clusters.create: No module named jsonschema.
This usually indicates corruption in your gcloud installation or problems with your Python interpreter.
Please verify that the following is the path to a working Python 2.7 executable:
/usr/bin/python2
If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 executable.
If you are still experiencing problems, please run the following command to reinstall:
$ gcloud components reinstall
If that command fails, please reinstall the Cloud SDK using the instructions here:
https://cloud.google.com/sdk/
Installing jsonschema does not seem to help.
This was an issue with gcloud sdk release 208.0.0. Upgrading to 208.0.1 should resolve this issue.

Cloud Shell , I should install CBT each time i open cloud shell the day after

To use any GCloud componet, I have installed on Cloud Shell just once, and i could use it each time i open cloud shell. But for CBT component for BigTable, I don't know what is happening that each time I close the browser the CBT tool is not installed any more and I should re-install it. The problem does not appear immediately, generally each day I should install it and it exist between installed components for whole day, and the day after I see it is not any more installed!
Any idea ?
This problem is caused by Google terminating idle Cloud Shell instances when they are not being used. Termination happens after about 60 minutes of non-use.
Only data stored in the $HOME directory persists after a new Cloud Shell is launched.
To install cbt the following steps are recommended:
gcloud components update
gcloud components install cbt
Since these components are not being installed in $HOME, they do not persist after Cloud Shell is terminated.
There are two methods that I recommend to solve this problem:
Google Cloud Shell is a Docker container. You can modify the docker image to customize to fit your needs. This method will allow you to install packages, tools, etc that are not located in your $HOME directory.
Modify .bashrc to run a script located in the $HOME directory to install cbt each time a new instance is created.
Note: It appears as of now that cbt is included in the default Cloud Shell instance. This answer should help others understand what is happening and be able to install other programs, tools, etc. persistently.

Command 'celeryd' not known when using ckanext-archiver

I'm using CKAN as my open data portal and am installing the Archiver Extension by following the instructions at https://github.com/ckan/ckanext-archiver. I have installed celery as shown:
Successfully installed celery kombu kombu-sqlalchemy messytables flask anyjson amqplib xlrd python-magic chardet json-table-schema lxml Werkzeug
But I am unable to run it.
/usr/lib/ckan/default/src$ paster celeryd -c /etc/ckan/default
Command 'celeryd' not known (you may need to run setup.py egg_info)
Known commands:
create Create the file layout for a Python distribution
exe Run #! executable files
help Display help
make-config Install a package and create a fresh config file/directory
points Show information about entry points
post Run a request for the described application
request Run a request for the described application
serve Serve the described application
setup-app Setup an application, given a config file
My CKAN root directory: usr/lib/ckan/default/src
path to ckan config file: /etc/ckan/default
Hope someone can help solve my issue. Thanks.
Sorry for the late answer but you need to be in /usr/lib/ckan/default/src/ckan context in order to perform the command.