How to install unofficial Firebase extension - firebase

Looking for information on steps to install the unofficial firestore-nlp-extension, link below.
https://github.com/FirebaseExtended/firestore-nlp-extension
I read the firestore docs but did not see instructions to install a "custom" extension.
Any help is appreciated!

You need to install the extension from a local source but this was available during the alpha and the below link is no longer working
https://firebase.google.com/docs/extensions/alpha/install-extensions_community#install
The specific extension does not seem to be available on the Firebase system:
Error: The extension reference
'firebase/firestore-natural-language-processing#latest' doesn't exist.
This could happen for two reasons: -The publisher ID 'firebase'
doesn't exist or could be misspelled -The name of the extension
version 'firestore-natural-language-processing#latest' doesn't exist
or could be misspelled
For the current beta from the cli tool I found the following:
First, clone the git repo of the extension:
git clone git#github.com:FirebaseExtended/firestore-nlp-extension.git
then run the following commands to build the project:
cd firestore-nlp-extension/functions
yarn add -D rimraf
yarn build
cd ../..
and then to install this extension, run:
firebase ext:install ./firestore-nlp-extension --project=YOUR_PROJECT
if you get a path error you might need to find the right path such as:
firebase ext:install ./firestore-nlp-extension/functions --project=YOUR_PROJECT

Related

"You attempted to use a firebase module that's not installed on your Android project by calling firebase.app()."

I followed https://rnfirebase.io/#managed-workflow guide on how to install Firebase. I created a new Expo app with:
npx create-react-native-app -t with-dev-client
As written in the guide. I then did
npx expo install #react-native-firebase/app
npx expo install #react-native-firebase/auth
Having nothing in the project except a Button which, when pressed creates an account with createUserWithEmailAndPassword.
This is when I am presented with this error:
Error: You attempted to use a firebase module that's not installed on your Android project by calling firebase.app().
Ensure you have:
imported the 'io.invertase.firebase.app.ReactNativeFirebaseAppPackage' module in your 'MainApplication.java' file.
Added the 'new ReactNativeFirebaseAppPackage()' line inside of the RN 'getPackages()' method list.
See http://invertase.link/android for full setup instructions.
Did I mess up on the way, or is there more steps than the guide suggests, or is the way I created the app the cause?
This was tested on an Android Emulator, launched by pressing 'a' in the terminal.
I appreciate any help!
Additional info:
I added the Google services as shown in the guide, with the name corresponding to the package name given in app.json.
Running expo prebuild --clean:
It says "(node:14360) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package" which I don't know if it could create an issue such as this.
You need to install #react-native-firebase/app module and initialize, then only you can use any of the #react-native-firebase/xxx modules. check the official documentation for authorization module here.

flutterfire : The term 'flutterfire' is not recognized as the name of a cmdlet, function, script file, or operable program

I am getting this error when I run "dart pub global activate flutterfire_cli" :
Activated flutterfire_cli 0.1.1+2. Package flutterfire_cli is
currently active at version 0.1.1+2. Resolving dependencies... The
package flutterfire_cli is already activated at newest available
version. To recompile executables, first-run dart pub global deactivate flutterfire_cli. Installed executable flutterfire.
Warning: Pub installs executables into
C:\Users\PC\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path"
environment variable. A web search for "configure windows path" will
show you how
I have added this to my user path but I am still getting this error.
I checked for solutionsto similar problems which suggested I restart the windows or vs code or terminal - I did all three but it is still not working .
I ran in cmd in that it did not give the warning but when I ran flutterfire configure . It gave this error:
"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."
running firebase --version gave this error:
'firebase' is not recognized as an internal or external command,
operable program or batch file
This should not be happening as I did connect my app to firebase console.
What worked for me is instead of typing
flutterfire I use flutterfire.bat, e.g. flutterfire.bat configure, that way the command works in the git bash with windows.
You have to add Flutter SDK path to your system environment. The error is arising because your system is not able to find the folder where you have installed Flutter in your system.
You may refer to the Stackoverflow case for the steps on how to set path for the system environment.
Alternatively, you may also refer to the video link.
If you have windows 10. Do not use firebase-tools-instant-win.exe its a trap!
Add Paths to System Variables. Don't forget to change to your username in YOU-USER-NAME
C:\Users\YOU-USER-NAME\AppData\Local\Pub\Cache\bin
C:\Users\YOU-USER-NAME\AppData\Roaming\npm
Next you can execute anywhere (in cmd or firebase-tools-instant-win.exe)
firebase login
npm install -g firebase-tools
dart pub global activate flutterfire_cli
Next you open only cmd.exe command promt and go to the root of your project.
cd c:\PATH-TO-YOU-PROJECT
flutterfire configure

how to solve "Failed at the fibers#2.0.0 install script' error while deploying the meteor app?

I know how to package and then deploy meteor application. But recently for one project i'm stuck at an error which i couldn't resolve.
Steps I followed for package and deploy of my meteor app:
1. meteor build package
2. cd package
3. tar -xf inventoryTool.tar.gz
4. cd bundle/programs/server
5. npm install
6. cd ../..
7. PORT=<port> MONGO_URL=mongodb://127.0.0.1:27017/dbName ROOT_URL=http://<ip> node main.js
Here is the log for the error when i run the npm install(STEP 5) command.
Is there anything missing in my execution?. I'm not using the fibers package anywhere in my project. Does anyone have solution to this problem? Thanks in advance.
Why this happens (a lot)?
Your local version of node is v8.9.4. When using the build command, you will export your application and build the code against this exact node version. Your server environment will require this exact version, too.
An excerpt from the custom deployment section of the guide:
Depending on the version of Meteor you are using, you should install
the proper version of node using the appropriate installation process
for your platform. To find out which version of node you should use,
run meteor node -v in the development environment, or check the
.node_version.txt file within the bundle generated by meteor build.
Even if you don't use fibers explicitly it will be required to run your Meteor app on the server correctly.
So what to do?
In order to solve this, you need to
a) ensure that your local version of node exactly matches the version on the server
b) ensure that you build against the server's architecture (see build command)
To install a) the very specific node version on your server you have two options:
Option I. Use n, as described here. However this works only if your server environment uses node and not nodejs (which depends on how you installed nodejs on the server).
II. To install a specific nodejs version from the repositories, you may do the following:
$ cd /tmp
$ wget https://deb.nodesource.com/node_8.x/pool/main/n/nodejs/nodejs_8.9.4-1nodesource1_amd64.deb
$ apt install nodejs_8.9.4-1nodesource1_amd64.deb
If you are not sure, which of both are installed on your server, check node -v and nodejs -v. One of both will return a version. If your npm install still fails, check the error output and if it involves either node or nodejs and install the desired distribution using the options above.
To build b) against the architecture on your server, you should use the --architecture flag in your build command.

firebase CLI will not recognize current directory for 'firebase init'

I am following a tutorial on Ionic Angular and it has come to the point where the instructor is having me publish my code to Firebase Hosting. First I used NPM to install the Firebase CLI. Then I was instructed to use the firebase init command. The issue is that the CLI doesn't seem to recognize the current directory that is selected in my terminal.
I run: cd /Users/MyUserName/myProjectsFolder/myProject/
Then I run firebase init and it displays:
You're about to initialize a Firebase project in this directory:
/Users/MyUserName
When I would expect it to read:
You're about to initialize a Firebase project in this directory:
/Users/MyUserName/myProjectsFolder/myProject
A little bit of googling found this page:
https://firebase.google.com/docs/cli/
Which includes this passage:
To initialize a new project directory, change directories in the terminal to your desired project directory and run: firebase init
Based on this I would expect the steps I took to work.
I am confused. Has anyone ever run into this behavior? Can anyone think of a way to get the CLI to function as expected?
Thanks.
Got to folder:
/Users/Username/
Search for a file with name of firebase.json and Delete it.
Reinstall firebase tool with this command (--unsafeper- to avoid
permissions error messages & use sudo):
$ sudo npm install --unsafeper- -g firebase-tools
Then, go to your pubilc folder (you have to create one) which
contains your HTML, JS, images and CSS files and use this command:
$ sudo firebase init
$ sudo firebase deploy
The reset is easy and as mentioned in the firebase
docs:
https://firebase.google.com/docs/hosting/quickstart
The reason is that you must have initiliazed a project in some parent directory (of this myProject folder) in the past. Somehow firebase sees that project in that directory rather than initializing a new project in the current path.
Solution:
Check the parent directories of the path where you want to initialize a firebase project now. Delete / Move the firebase files from that folder and then you should be able to initialize a project in the current directory.
For example:
I also faced the same problem.
I was trying to initialize a project in this path:
D:\Work\Projects\myProject
But somehow it always got initialized in this path:
D:\Work
After some searching it turned out that the reason was that I had initialized a project in
D:\Work directory. I moved those files to another folder and that solved the problem.
I was also facing this problem and windows not able to recognize the firebase. I don't know the exact reason why it was behaving in such a manner but it solved the problem.
1) I installed the firebase-tools using a command on command prompt
npm install -g firebase-tools
and it didn't work.
2) I restarted the machine.
3) then again I executed the same command from step 1) npm install -g firebase-tools
and it worked.
Was trying to do this and discovered a command that allows "firebase" as a command.curl -sL https://firebase.tools | bash This will allow $ firebase login and $ firebase init to work.
I was facing the same issue. After checking the log I figured out that the Authentication token was expired from my firebase cli login session. So I logged out and Logged-In again to the firebase cli using Firebase logout And firebase login command. Problem solved.
To check out your issue go to firebase log using firebase-debug.log command.
And take required steps.

Deploy SNAPSHOT artifact and sources to Nexus from Maven command line

I am trying to deploy one EXE file and it's zipped source file to Sonatype Nexus using maven command line. Files must be deployed as SNAPSHOTs.
So, I have 2 files:
-testXYZ.exe and source file
-testXYZ.zip
Using maven 2.2.1 and command described here:
mvn deploy:deploy-file -Durl=file:///home/me/m2-repo \
-DrepositoryId=some.repo.id \
-Dfile=./path/to/artifact-name-1.0.jar \
-DpomFile=./path/to/pom.xml \
-Dsources=./path/to/artifact-name-1.0-sources.jar \
-Djavadoc=./path/to/artifact-name-1.0-javadoc.jar
I can deploy EXE, but cannot deploy source, because maven 2.2.1 is using deploy-plugin v2.5 and this command is not supported until v2.7.
It is not allowed to me to use newer versions of maven, so I try different approach.
Using these two subsequent commands I can deploy these two artifacts, but, source cannot be downloaded from nexus.
call mvn deploy:deploy-file -DgroupId=com.xyz -DartifactId=testXYZ -Dversion=1.1.116-SNAPSHOT -Dpackaging=zip -Dfile=testXYZ.zip -Dclassifier=sources -Durl=http://build:8081/nexus/content/repositories/snapshots -DrepositoryId=nexus
call mvn deploy:deploy-file -DgroupId=com.xyz -DartifactId=testXYZ -Dversion=1.1.116-SNAPSHOT -Dpackaging=exe -Dfile=testXYZ.exe -Durl=http://build:8081/nexus/content/repositories/snapshots -DrepositoryId=nexus
After deploy, i search for testXYZ and click on artifact source download link.
Nexus says:
"Item not found on path
"com.xyz:testXYZ:1.1.116-SNAPSHOT:c=sources:e=jar"!"
Problem is the way maven upload these artifacts:
Line form log file while source is uploading:
Uploaded: http://build:8081/nexus/content/repositories/snapshots/com/xyz/testXYZ/1.1.116-SNAPSHOT/testXYZ-1.1.116-20120106.111705-1-sources.zip
Line form log file while Main artifact is uploading:
Uploaded: http://build:8081/nexus/content/repositories/snapshots/com/xyz/testXYZ/1.1.116-SNAPSHOT/testXYZ-1.1.116-20120106.111709-2.exe
Notice 111705-1 and 111705-2. Last number must be the same if we wish Nexus can generate correct links.
This approach is described here:
Deploying an artifact, its sources and javadoc using maven's deploy:deploy-file plugin
and here:
http://maven.apache.org/plugins/maven-install-plugin/examples/installing-secondary-artifacts.html
and it working for fixed versions(for example 1.1.116), but not for SNAPSHOTs.
Exe and Zip files can be deployed to Nexus (like jar files), if fixed version is used.
So, question is:
Is there a way to deploy artifact and source SNAPSHOTs from command line to Sonatype Nexus and to be sure that these files can be downloaded by clicking on sources and artifacts links?
Note:
If I disable timestamps suffix, this can work, but I do not want to do this.
-DuniqueVersion=false
Thanks,
Marjan
I found partial solution for this problem. I can call specific version of maven-deploy-plugin like this:
mvn org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file...
This way, artifacts and sources SNAPSHOTs can be deployed to Nexus avoiding any problems with download, but it behave like
-DuniqueVersion=false
is still there.

Resources