# Ember-cli on ubuntu 14.04

**URL:** <https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816>\
**Category:** Ember CLI\
**Created:** [April 17, 2015, 7:34pm UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816 "2015-04-17T19:34:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sintyaj](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sintyaj](https://discuss.emberjs.com/u/sintyaj)\
**Post date:** [April 17, 2015, 7:34pm UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816/1 "2015-04-17T19:34:44Z")

</div>

Hi all, I’m new to Ember and I’m trying to create new ember app using using ember-cli on ubuntu. For some reason the app is not created and I can’t see any error on screen. Anyone had such problem? Thanks!

---

<div class="post-metadata">

**Author:** ![tsantos83](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/tsantos83/32/14256_2.png) [@tsantos83](https://discuss.emberjs.com/u/tsantos83)\
**Post date:** [April 17, 2015, 8:00pm UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816/2 "2015-04-17T20:00:28Z")

</div>

have you tried? `sudo ember new app`?

---

<div class="post-metadata">

**Author:** ![sintyaj](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sintyaj](https://discuss.emberjs.com/u/sintyaj)\
**Post date:** [April 18, 2015, 7:33am UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816/3 "2015-04-18T07:33:23Z")

</div>

Yep, tried to re-install ember-cli and update npm. Nothing helped.

---

<div class="post-metadata">

**Author:** ![sintyaj](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sintyaj](https://discuss.emberjs.com/u/sintyaj)\
**Post date:** [April 18, 2015, 8:43am UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816/4 "2015-04-18T08:43:28Z")

</div>

fixed by: sudo apt-get install nodejs instead sudo apt-get install node. Thanks 😄

---

<div class="post-metadata">

**Author:** ![kylecoberly](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kylecoberly/32/15828_2.png) [@kylecoberly](https://discuss.emberjs.com/u/kylecoberly)\
**Post date:** [April 18, 2015, 7:35pm UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816/5 "2015-04-18T19:35:18Z")

</div>

A warning to all: this will work, but it is generally a very bad idea. The simple truth is that you shouldn’t install node with Synaptic, because it will mean requiring sudo to do basically anything in node. A much better strategy is to use [`nvm`](https://github.com/creationix/nvm).

1. `wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.24.1/install.sh | bash`
2. Restart your terminal
3. `nvm install 0.10`
4. `nvm use 0.10`
5. Do all of your node stuff sudo-free (`npm install -g ember-cli`, `npm install`, `ember s`, etc.)

Note that you’ll need to run `nvm use 0.10` every time you restart your terminal. You could also use 0.12 or iojs, but not every add-on supports these right now (SASS being the biggie).

To uninstall node, I’ve found that [these instructions](http://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x) work fine on 14.04 even though they say it’s for OSX.

---

<div class="post-metadata">

**Author:** ![od1n](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/od1n/32/10680_2.png) [@od1n](https://discuss.emberjs.com/u/od1n)\
**Post date:** [April 19, 2015, 12:21am UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816/6 "2015-04-19T00:21:52Z")

</div>

Let me disagree with you in this passage

> [@kylecoberly](#):
>
> it will mean requiring sudo to do basically anything in node

When you have npm installed by a package manager, the only case you need to use sudo is a global installation of a gem. And in fact it is required only because npm needs to create symlink for the gem in /usr/bin, which is always available to write only for the root user.

It’s totally ok to use nodejs from the package manager, the only point you need to take into account is, as I said above, to install global gems with sudo. All other operations work without sudo, so `ember new app-name` is a correct call. I’d be concerning more about version of the nodejs from the synaptic, because by default it’s 0.10, which is pretty old for ember-cli

---

<div class="post-metadata">

**Author:** ![dpreston](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dpreston/32/10590_2.png) [@dpreston](https://discuss.emberjs.com/u/dpreston)\
**Post date:** [April 19, 2015, 2:09am UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816/7 "2015-04-19T02:09:18Z")

</div>

> [@kylecoberly](#):
>
> Note that you’ll need to run nvm use 0.10 every time you restart your terminal.

`nvm alias default 0.10` will set the default version for new terminals.

---

<div class="post-metadata">

**Author:** ![kylecoberly](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kylecoberly/32/15828_2.png) [@kylecoberly](https://discuss.emberjs.com/u/kylecoberly)\
**Post date:** [April 19, 2015, 3:35pm UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816/8 "2015-04-19T15:35:45Z")

</div>

> [@od1n](#):
>
> When you have npm installed by a package manager, the only case you need to use sudo is a global installation of a gem.

Apologies, I mispoke. My point stands though- letting any rando who publishes to npm run scripts as a superuser on your machine is a bad idea.

> [@dpreston](#):
>
> nvm alias default 0.10 will set the default version for new terminals.

Good call!! Missed that in the docs.

---

<div class="post-metadata">

**Author:** ![rndm](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rndm/32/4229_2.png) [@rndm](https://discuss.emberjs.com/u/rndm)\
**Post date:** [April 19, 2015, 3:50pm UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816/9 "2015-04-19T15:50:23Z")

</div>

> [@od1n](#):
>
> When you have npm installed by a package manager, the only case you need to use sudo is a global installation of a gem. And in fact it is required only because npm needs to create symlink for the gem in /usr/bin, which is always available to write only for the root user.

You can change the npm `prefix` to something like `"/home/$USER/npm"` [https://docs.npmjs.com/cli/prefix](https://docs.npmjs.com/cli/prefix) This way you’ll never need `sudo` for global packages. (Don’t forget to add the prefix bin dir to your `PATH`)

---

<div class="post-metadata">

**Author:** ![od1n](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/od1n/32/10680_2.png) [@od1n](https://discuss.emberjs.com/u/od1n)\
**Post date:** [April 20, 2015, 12:14am UTC](https://discuss.emberjs.com/t/ember-cli-on-ubuntu-14-04/7816/10 "2015-04-20T00:14:27Z")

</div>

Ok. Your solution:

1. Change npm `prefix` to `/home/$USER/npm`
2. Add the prefix bin dir to your PATH (what in fact equals to - modify one of your .bash\* files)

My solution:

1. Write `sudo` before npm when you install a global package.

Can you predict whose solution will be used more often? I believe you can and you know why.

To make it clear - I actually don’t do as I propose and I got your points, especially from Kyle

> [@kylecoberly](#):
>
> My point stands though- letting any rando who publishes to npm run scripts as a superuser on your machine is a bad idea.

But (1) bower and ember-cli packages are not from rando, all other packages will be installed without sudo; (2) I don’t even see a problem when I do it in my development environment, for example, in a vagrant box. It’s not an absolute evil, as I understand you, guys, want to imagine it. It’s just a simpler solution in a suitable environment.
