docs/source/install.md
You need to install the Meteor command line tool to create, run, and manage your Meteor.js projects. Check the prerequisites and follow the installation process below.
<h2 id="prereqs">Prerequisites</h2> <h3 id="prereqs-node">Node.js version</h3>Meteor 2.x runs on a deprecated Node.js version (14). Meteor 3 has been released with support for the latest Node.js LTS version. For more information, please consult our migration guide and the latest docs.
Install the latest official version of Meteor.js from your terminal by running one of the commands below. You can check our changelog for the release notes.
Meteor 2.x runs on a deprecated Node.js version (14). Meteor 3 is released with support for the latest Node.js LTS version. For more information, please consult our migration guide and the new docs.
For Windows, Linux and OS X, you can run the following command:
Preferably, do not use
sudoto install Meteor. If you need to usesudo, please check the troubleshooting section.
npm install -g meteor
An alternative for Linux and OS X, is to install Meteor by using curl:
curl https://install.meteor.com/ | sh
You can also install a specific Meteor.js version by using curl:
curl https://install.meteor.com/\?release\=2.8 | sh
<h2 id="troubleshooting">Troubleshooting</h2>Do not install the npm Meteor Tool in your project's package.json. This library is just an installer.
If your user doesn't have permission to install global binaries, and you need to use sudo, it's necessary to append --unsafe-perm to the above command:
sudo npm install -g meteor --unsafe-perm
We strongly discourage the usage of Node.js or Meteor with root permissions. Only run the above command with sudo if you know what you are doing.
If you only use sudo because of a distribution default permission system, check this link for fixing it.
In some cases you can get this error npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules because your Node.js installation was performed with wrong permissions. An easy way to fix this is to install Node.js using nvm and forcing it to be used in your terminal. You can force it in the current session of your terminal by running nvm use 14.
As a last resort you can delete the .meteor folder in your home directory and try to install Meteor again using the correct permissions.
By default, the Meteor installer adds its install path (by default, ~/.meteor/) to your PATH by updating either your .bashrc, .bash_profile, or .zshrc as appropriate. To disable this behavior, install Meteor by running:
npm install -g meteor --ignore-meteor-setup-exec-path
(or by setting the environment variable npm_config_ignore_meteor_setup_exec_path=true)
For Apple M1 computers, you can append Rosetta prefix as following, if you need to run older versions of Meteor (before 2.5.1):
arch -x86_64 npm install -g meteor
or select Terminal in the Applications folder, press CMD(⌘)+I and check the "Open using Rosetta" option.
<h2 id="meteor-docker">Run Meteor inside Docker</h2>You can also use a Docker container for running Meteor inside your CI, or even in your local development toolchain.
We do provide the meteor/meteor-base ubuntu-based Docker image, that comes pre-bundled with Node.JS and Meteor, and runs it as a local user (not as root).
You can refer to our meteor/galaxy-images repository to see how to use it, and the latest version. More about meteor-base here.
<h2 id="windows">Note for Windows users</h2>On Windows, the installer runs faster when Windows Developer Mode is enabled. The installation extracts a large number of small files, which Windows Defender can cause to be very slow.
<h2 id="nvm">Node version manager</h2>If you use a node version manager that uses a separate global node_modules folder for each Node version, you will need to re-install the meteor npm package when changing to a Node version for the first time. Otherwise, the meteor command will no longer be found.
To be able to user meteor command from fish it's needed to include /home/<user>/.meteor in $PATH; to do that just add this line in /home/<user>/.config/fish/config.fish file (replace <user> with your username):
set PATH /home/<user>/.meteor $PATH
If you installed Meteor using npm, you can remove it by running:
meteor-installer uninstall
If you installed Meteor using curl, you can remove it by running:
rm -rf ~/.meteor
sudo rm /usr/local/bin/meteor