How can I completely uninstall and then reinstall Meteor.js?

后端 未结 6 1712
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-02 07:48

My app started crashing for absolutely no reason. I rolled back to a version I knew worked, but it is still crashing. I cloned a version from github that I absolutely know

相关标签:
6条回答
  • 2020-12-02 08:08

    I think the easiest is

    curl https://install.meteor.com/ | sh
    
    0 讨论(0)
  • 2020-12-02 08:08

    There's something else here too, I read a file, located in /usr/local/bin/ named meteor in the comments on the top it was written:

        #!/bin/bash
    
    # This is the script that we install somewhere in your $PATH (as "meteor")
    # when you run
    #   $ curl https://install.meteor.com/ | sh
    # It's the only file that we install globally on your system; each user of
    # Meteor gets their own personal package and tools repository, called the
    # warehouse (or, for 0.9.0 and newer, the "tropohouse"), in ~/.meteor/. This
    # means that a user can share packages among multiple apps and automatically
    # update to new releases without having to have permissions to write them to
    # anywhere global.
    #
    # All this script does is exec ~/.meteor/meteor. But what if you don't have it
    # yet? In that case, it downloads a "bootstrap tarball", which contains the
    # latest version of the Meteor tools, and plops it down at ~/.meteor. In fact,
    # once you've run this once, you don't even really need this script: you can put
    # ~/.meteor/ into your PATH, or a symlink to ~/.meteor/meteor into some other
    # PATH directory. No special permissions needed!
    #
    # To uninstall Meteor from your system, just delete this shell script, and
    # delete your warehouse (~/.meteor/).
    

    Here's the line to uninstall meteor :

    # To uninstall Meteor from your system, just delete this shell script, and
    # delete your warehouse (~/.meteor/).
    

    And voila! where's the warehouse! some of you might think this warehouse as the .meteor folder in the projects, but it's not! 2-3 lines below it is written:

    METEOR_WAREHOUSE_DIR="${METEOR_WAREHOUSE_DIR:-$HOME/.meteor}"
    

    that's where the warehouse is!

    Reseting a Meteor Project is done by "meteor reset" would only reset your project packages.

    P.S. This is for meteor v1+

    0 讨论(0)
  • 2020-12-02 08:15

    Let’s start with the deletions, then we’ll move on to the reinstallations.

    1. If you ever installed Meteorite, uninstall and delete it:

      sudo mrt uninstall
      sudo mrt uninstall --system
      rm -rf ~/.meteorite
      
    2. Then delete Meteor:

      sudo rm /usr/local/bin/meteor
      rm -rf ~/.meteor
      

    Now start over at the beginning:

    1. Repair permissions if necessary:

      sudo chown -R $(whoami) ~/.npm
      
    2. Reinstall Meteor:

      curl https://install.meteor.com/ | sh
      
    3. Next check that your project has all its proper packages:

      cd /path/to/your/project
      meteor update
      
    4. If your project still won’t compile, you can reset it (warning: deletes database):

      cd /path/to/your/project
      meteor reset
      
    5. Still no luck? Recreate the Meteor project (warning: deletes database and the project’s memory of what packages you’ve installed):

      cd /path/to/your/project
      rm -rf ./.meteor
      cd ..
      meteor create project-new
      rm ./project-new/project-new.*
      mv ./project/* ./project-new/
      cd ./project-new
      

      (and run meteor add *packagename* over and over to reinstall each package you were using)

    0 讨论(0)
  • 2020-12-02 08:27

    If you are searching for answer in 2017/2018 on Windows Operating Systems:

    choco uninstall meteor
    

    Then

    choco install meteor
    
    0 讨论(0)
  • 2020-12-02 08:27

    Uninstalling Meteor for Linux and OS X users

    Open up terminal and run the following command-

    1. sudo rm /usr/local/bin/meteor
    2. rm -rf ~/.meteor
    


    Installing Meteor

    Open up terminal and run the following command-

    1. curl https://install.meteor.com/ | sh
    
    0 讨论(0)
  • 2020-12-02 08:31

    I tried all of this and none of it worked.

    Then I ran meteor --verbose in the command line and it seems to have sorted out the kinks! A quick meteor reset and everything is working again now!

    0 讨论(0)
提交回复
热议问题