Meteor command not found
Asked Answered
S

7

9

I installed the same version from Official Windows Meteor Support on one computer and the command "meteor" runs normally, now I tried to install in another computer but is giving me the issue that the "meteor command was not found". I tried to add the path to the system variables, but it doesn't seem to work. Any ideas? Thank you

Sixfooter answered 17/3, 2015 at 23:34 Comment(0)
M
20

I have just discovered in Windows (I am using Windows 8.1) that you have to type meteor.bat to invoke meteor. e.g. meteor.bat create myapp

Malamud answered 29/7, 2015 at 20:33 Comment(0)
K
16

The answers already listed were only half the answer for me.

The following steps, resolved the issue.

Set the SYSTEM Environment Variable to:

C:\Users\%username%\AppData\Local\.meteor

Or if you prefer, change to your username explicitly

C:\Users\rich\AppData\Local\.meteor

Then as per the accepted answer on this question.

Create a file named meteor in the directory where the meteor.bat is. E.g. the path above.

Hint, you can use

touch meteor

Copy these lines into the file and save

#!/bin/sh
cmd //c "$0.bat" "$@"
Kesha answered 2/12, 2016 at 22:23 Comment(2)
If you're using git bash or any other bash shell, this is the answer you're looking for.Stambul
Was trying to run meteor in a git bash shell on Windows 10 and this was the answer for me!Knickerbocker
A
8

For others that might come across this issue.

I'm on Windows 10 and installed Meteor 1.4. Was getting meteor command not found when trying to run meteor from command prompt.

I checked my users PATH variables and found this entry:

C:\Users\%username%\AppData\Local\.meteor\

I removed the last backslash, saved the PATH variables, and then opened a new command prompt. The meteor command was now recognized.

My PATH variable entry now looks like this with the last backslash removed:

C:\Users\%username%\AppData\Local\.meteor

Note: You can replace %username% with your actual windows username. The entry should work fine as the system will resolve it to your username.

Airfoil answered 11/8, 2016 at 15:41 Comment(0)
W
1

If path variable is not present in environment variables, You can execute the command only from the directory where meteor is present. i.e., "C:\Users\username\AppData\Local.meteor\" directory.

To use the meteor from any directory inside the command prompt, Add path variable to the environment settings.

"C:\Users\username\AppData\Local.meteor\meteor.bat". Restart command prompt if already open. This will enable meteor command to work everywhere.

Whipperin answered 19/4, 2015 at 19:32 Comment(0)
M
0

The question is old but it might help others who face similar issue.

I just installed meteor and had the same issue. It looks like it installed successfully and added C:\Users\USERNAME\AppData\Local.meteor to the User variable (not system variable).

I am using Windows 10 and I might have to re-login or reboot for that to start working properly.

So, to use without re-login or reboot, use complete path in the directory where you want to create the project:

C:\Projects> C:\Users\USERNAME\AppData\Local.meteor\meteor my_project

Hope it helps.

Markley answered 26/5, 2016 at 6:30 Comment(0)
S
0

Using the Node Command prompt instead of Terminal worked for me. Search for Node Command Prompt in the Start Menu.

Shrub answered 15/9, 2021 at 4:43 Comment(0)
B
0

On Linux, If the problem comes from systemd service (systemclt) configuration, the PATH is not recognized properly, then:

Here is the error log:

Feb  3 00:13:43 localhost metassa-org[65870]: > meteor run --port=9999
Feb  3 00:13:43 localhost metassa-org[65881]: sh: 1: meteor: not found
Feb  3 00:13:43 localhost metassa-org[65870]: npm ERR! code 127
Feb  3 00:13:43 localhost metassa-org[65870]: npm ERR! path /var/www/domain.org/meteor/simple-todos-react
Feb  3 00:13:43 localhost metassa-org[65870]: npm ERR! command failed

Edit your service configuration file:

Environment="PATH=/home/ubuntu/.npm-global/bin:/home/ubuntu/.meteor:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$PATH"

Replace /home/ubuntu with your user folder containing meteor install. You may replace all with your current $PATH value instead.

ExecStart=/usr/bin/npm run start --prefix /var/www/meteor/simple-todos-react

Modify /var/www/meteor/simple-todos-react with your meteor project

Finally, restart your service.

sudo systemctl daemon-reload
Beaune answered 3/2, 2022 at 0:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.