How to create a new Meteor project?

Hello,

Official docs say that preferred way to install the latest official Meteor release is from your terminal using this command:

npm install -g meteor

and not this one:

curl https://install.meteor.com/ | sh

So my question is if I use the preferred way of installing Meteor how I can create a new project? When I use the following command:

meteor create myapp

I got the following output:

-bash: meteor: command not found

The answer might be very simple and quite obvious but for someone who just starts it is not clear at all.

Thank you

very strange… on Linux I installed every time with “curl https://install.meteor.com/ | sh”, then create a directory, go in and do “meteor create [name]”.
I’m very curious to know why in the first page of official site there is that npm command…

Just found it:

and this:

The old way still works.

Hi @bazl
You have to open a new terminal window for the command be included in your path.
Is it still happening after it?

Yes it does work. I will use it until someone will fix the new command.

Unfortunately it is still not working even after I open new terminal window.

@bazl can you share with me the last lines of your ~/.bashrc?
It would also be particulary useful if you could share your distro name too.

Sure:
MacOS Catalina (10.15.7), MacBookPro 2012

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
export PATH=/Users/MyUserName/.meteor:$PATH

Thanks.
Can you run the executable file directly by calling /Users/MyUserName/.meteor/meteor ?
If so, .bashrc is not being reloaded in a new terminal window, so I would recommend rebooting.

Also a question, are you using bash or zsh as your default terminal?

It works if I run the executable file directly. I have rebooted my laptop but it did not fix the issue. I am using bash terminal as default.

Thank you for the clue! :slightly_smiling_face:I have managed to fix the issue. I added the following code into .bash_profile

# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
fi

Thank you for reporting!
I will change the Mac install script to also include this snippet on .bash_profile, as seems like different Mac versions have different behaviors on sourcing bashrc.

Thanks again, and I hope it’s fixed now!

1 Like