I have followed the following tutorial and have successfully installed everything but ember-cli. http://www.ember-cli.com/#getting-started
All the above work with no problems but when I try to ember new my-new-app
I got the following
$ ember new my-new-app
-bash: ember: command not found
When I do $ npm install -g ember-cli
I get the following
$ npm install -g ember-cli
/Users/MGK/.node/bin/ember -> /Users/MGK/.node/lib/node_modules/ember-cli/bin/ember
[email protected] /Users/MGK/.node/lib/node_modules/ember-cli
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], quick- [email protected], [email protected], [email protected], [email protected])
Any ideas?
Update, here is my echo $PATH
$ echo $PATH
/Users/MGK/.rvm/gems/ruby-2.1.2/bin:/Users/MGK/.rvm/gems/ruby-2.1.2@global/bin:/Users/MGK/.rvm/rubies/ruby-2.1.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/MGK/.rvm/bin
The problem is that npm's path isn't in your $PATH
variable, so your shell has no idea where to look for any of your npm modules. There are a few ways to remedy this:
Run npm config get prefix
. Open your .bash_profile
or .bashrc
config file and add the following line:
export PATH="~/.node/bin:$PATH"
This will add your npm executables to your path. (~/.node/bin
was taken from the console output when you installed ember-cli)
Then run source ~/.bashrc
or source ~/.bash_profile
depending on which file you edited. This will load the changes you've made to your $PATH
. Or:
Run npm config set prefix /usr/local
(/usr/local
since you're on a Mac and it's already in your $PATH).
(See this question for a more general instance of the same npm installation issue.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With