Cannot update firebase tools from 3.19.1 - firebase

Prior to version 4.0.0 being released I had no problems with my app. I have been trying to update Firebase Tools since 3.19.3 was released and it will not work. It says that it updates without any errors but the tools are stuck on version 3.19.1. It is not updating.
After the release of 4.0.0 hosting no longer works. Cloud functions and Firestore are working without issue. I don't get any errors. It just doesn't work. I've been tying everything I can and searching all over forums for answers and nothing.
Hosting is not working. Static assets are not loading. It says that index.html cannot be found...but that is because there is no index.html because I am using express-handlebars templating engine. I have index.handlebars which was working fine before the release of firebase-tools version 4.0.0.
Still can't update firebase-tools to the latest version.

The issue was that I had firebase-tools installed in two different directories on my computer. The directory that was being updated was not the directory that my project was using. I'm still not sure how that happened but I uninstalled firebase and node and reinstalled them and that solved the problem.

To update firebase-tools, just run this command in the terminal:
curl -sL firebase.tools | upgrade=true bash
note: you must have curl installed.

Related

Firebase CLI giving segmentation fault on Ubuntu

I'm having a hard time with firebase CLI,when I install it with npm, either locally in a projet or globally, and I call the command firebase it gives Segmentation fault with no further details.
I firs thought that the problem was with my version of Node since I was using 9.x, I moved back to 8.x versions, and reinstalled firebase with no success, I upgraded to 12.x, with no success too always same error.
I'm using NVM to handle my node versions properly, but still I can't find a fix for this problem.
nvm list gives this :
-> v8.11.3
v8.13.0
v12.3.0
system
When I run npm list firebase-tools it gives firebase-tools#7.9.0, I also tried uninstalling and reinstalling with no success .

Setting up Firebase CLI to use Functions

I am trying to update my Firebase CLI installation, in order to use the cloud functions for my project. I followed the getting-started guide, however for some reason, the CLI cannot detect the updated version.
I initialized a project of mine that I have already created via the Firebase console. During the project initialization, Firebase CLI mentioned that my CLI version should be updated, however the complete procedure went smoothly.
Once the initialization completed, I run for the first time (to update the CLI):
npm install -g firebase-tools
Once the updated finished, the command line reported:
firebase-tools#3.18.6
But when I run
firebase init functions
I get:
Error: CLI is out of date (on 3.0.1 , need at least 3.0.5)
I don't understand why this is happening, since the update reported that version 3.18.6 got installed Any hints would be great!
For reference, you can see a snapshot of the command line here.
It looks like you may have multiple versions of node installed in different locations. First, uninstall all versions of node that you may have previously installed. Make sure running node on the command line doesn't execute anything. Then, reinstall everything. After you've installed the Firebase CLI again, check its version with firebase --version.

how do I install a previous version of meteor JS?

I'm trying to host a meteor app that uses an old version of meteor.
Every time i try to start the app it will get somewhat through the process of installing the tool, and then i see a message such as:
Killednloading meteor-tool#1.1.3... -
(note how killed somehow overwrites the downloading part of the command line)
Is there a reliable way to install the meteor tool at a specific version?
EDIT:
The Meteor team added a release parameter to their download endpoint. Now you can simply specify the desired version:
curl "https://install.meteor.com/?release=1.3.3.1" | sh
For Windows, a version parameter exists for the choco installer:
choco install meteor --version 1.3.3.1
Original solution
You can use sed for that. Insert it in the middle of curl and sh:
curl https://install.meteor.com/ | sed 's/1.4/1.3.3.1/' | sh
That will replace the release 1.4 (current version) to 1.3.3.1
When you create a meteor app you can specify a release:
meteor create test --release x.y.z
And when you update a meteor app you can do the same:
meteor update --release x.y.z
#Jorge Issa's answer is good if you are installing Meteor from scratch, on a system that never had Meteor installed, however it's subject to change since versions change all the time, so you need to adapt the sed line.
If you have any version of Meteor already installed, as Michel Floyd mentioned, you can always create a project with a specific version by adding the --release flag.
meteor update --release xxxx works fine with you're actually upgrading, but downgrading is a different story.
My recommendation when it comes to upgrading and eventually downgrading, is to use version control (git).
Attempt upgrade and if all is fine, you're in good shape, if not and you want to downgrade, simply clear the file changes in your version control system and use meteor reset to clean your project and rebuild with the previous version.
!Note! meteor reset clears the local mongo database too, so be sure to back that up first if you're going to do that (check mongodump and mongorestore for that)
finally, if you're looking to clean up the clutter from the .meteor folder, you can delete the folder and then run meteor reset in your project: the meteor executable will detect you don't have the needed packages will re-download the packages for the version needed by your project. (This takes a while and if you have many project, can be cumbersome as you need to do this in each project, but if like me you are looking to clear some space, this works fine.)
Try:
meteor update --release x.y.z
Try
choco install meteor --x86 --params="'/RELEASE:1.5.4.4'"

Meteor stopped working

I was working on a meteor project (version 1.2, React installed) when suddenly a spew of errors appeared in the command prompt. I could no longer start the server. Entering 'meteor' and nothing happened. I then uninstalled meteor completely and reinstalled (now version 1.3). The problem persisted. The only command I could get to work was 'meteor --help'. Even doing a new create (meteor create newapp) did nothing. The command line carriage returned and did nothing. I'm running under windows 10.
Some people have ran into issues when updating to meteor 1.3. Possible duplicate answered here:
Unable to install meteor 1.3 on win 8.1 laptop
I had this issue too. It's a problem from the 1.3 release on Windows.
In the github issues you can find the solution they found to solve this temporarily; what you have to do is this:
Delete the following folders from C:\Users\YOUR_USER_NAME\AppData\Local.meteor\packages
templating, templating-tools, ecmascript, standard-minifier-css. But some people mention having to delete extra folders too <-- emphasis on this
Then open the console as administrator and run meteor in the folder where your app is, so it starts downloading the missing packages you deleted.
This would be enough for it to work.

Can I undo updating Meteor?

I think updating Meteor might have broken my app. It was working, then I ran meteor update, and now it is not working. Can I do something like meteor downgrade?
Meteor 0.6.0 and above ships with a new distribution system. You can now pass the --release argument to any Meteor command and it will run against the requested release. For example, to bundle your app against Meteor 0.6.1, run: meteor bundle --release 0.6.1. Notably, this only works for post-0.6.0 releases.
If you want to pin your app to a specific release, run: meteor update --release <release>. This modifies the .meteor/release file in your app directory. Then simply run Meteor as usual. You'll still get notified when there's a new release available.
UPDATE: As of Meteor 0.6.0, this functionality is available without using Meteorite. See Avital's answer. (for versions > 0.6.0. To use functionality on versions less than 0.6.0 you can still use Meteorite:
If you want to control versions with your apps (so your existing app can still use an older version, or 0.57.1 (with the security bug fix) you can use meteorite: https://github.com/oortcloud/meteorite
Install it via npm install -g meteorite
Its also helpful with loads of other packages from http://atmosphere.meteor.com.
To control the version of your app edit your smart.json to something with:
{
"meteor": {
"tag": "v0.5.7"
}
}
Only the app you've already made will be affected & you can upgrade it when you're ready.
I have tried this and it is very hard. My best advice is to try and copy all the files from an app running the version you want, then paste your app's code in there.
There is no meteor downgrade command from its CLI. The best and easy way if you have version control like GIT, just undo your recent changes by git stash save, and run meteor again.
On Windows, I was able to effectively "downgrade" from a failed upgrade by editing the version number to a previous working release in the file:
C:\Users\Paul\AppData\Local.meteor\meteor.bat
You need to change it to a version which has a corresponding folder in: .meteor\packages\meteor-tool

Resources