# Can't install Ember CLI without root

**URL:** https://discuss.emberjs.com/t/cant-install-ember-cli-without-root/6223
**Category:** Ember CLI
**Created:** [September 8, 2014, 4:56am UTC](https://discuss.emberjs.com/t/cant-install-ember-cli-without-root/6223 "2014-09-08T04:56:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ahmadhasankhan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ahmadhasankhan/32/9509_2.png) [@ahmadhasankhan](https://discuss.emberjs.com/u/ahmadhasankhan)
#### Post date: [September 8, 2014, 4:56am UTC](https://discuss.emberjs.com/t/cant-install-ember-cli-without-root/6223/1 "2014-09-08T04:56:50Z")

</div>

I have installed node with sodu.

after that when i’m trying to install ember-cli i am getting this issue…

```
npm install -g ember-cli
npm http GET https://registry.npmjs.org/ember-cli
npm http 200 https://registry.npmjs.org/ember-cli
npm http GET https://registry.npmjs.org/ember-cli/-/ember-cli-0.0.44.tgz
npm http 200 https://registry.npmjs.org/ember-cli/-/ember-cli-0.0.44.tgz
npm WARN engine ember-cli@0.0.44: wanted: {"node":">= 0.10.0"} (current: {"node":"v0.8.21","npm":"1.1.71"})
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/ember-cli'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/ember-cli']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/ember-cli',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/ember-cli',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack: 
npm ERR! [ 'DirWriter._create (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23)',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53',
npm ERR! 'Object.oncomplete (fs.js:297:15)' ] }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.2.0-61-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "ember-cli"
npm ERR! cwd /home/ahmed
npm ERR! node -v v0.8.21
npm ERR! npm -v 1.1.71
npm ERR! path /usr/local/lib/node_modules/ember-cli
npm ERR! fstream_path /usr/local/lib/node_modules/ember-cli
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/ember-cli'
npm ERR! fstream_stack DirWriter._create (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23)
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:297:15)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR! /home/ahmed/npm-debug.log
npm ERR! not ok code 0

```

please help

---

<div class="post-metadata">

### Author: ![ahmadhasankhan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ahmadhasankhan/32/9509_2.png) [@ahmadhasankhan](https://discuss.emberjs.com/u/ahmadhasankhan)
#### Post date: [September 8, 2014, 6:22am UTC](https://discuss.emberjs.com/t/cant-install-ember-cli-without-root/6223/2 "2014-09-08T06:22:15Z")

</div>

When installing with sudo…

sudo npm install -g ember-cli /usr/local/bin/ember → /usr/local/lib/node\_modules/ember-cli/bin/ember npm WARN unmet dependency /usr/local/lib/node\_modules/npm/node\_modules/npm-registry-client/node\_modules/couch-login requires request@‘~2.9.202’ but will load npm WARN unmet dependency /usr/local/lib/node\_modules/npm/node\_modules/request, npm WARN unmet dependency which is version 2.30.0 ember-cli@0.0.44 /usr/local/lib/node\_modules/ember-cli ├── abbrev@1.0.5 ├── js-string-escape@1.0.0 ├── broccoli-writer@0.1.1 (rsvp@3.0.13, quick-temp@0.1.2) └── yam@0.0.14 (lodash@2.4.1, findup@0.1.5, fs-extra@0.8.1) ahmed@shivank-Vostro-2420:~$ ember -v version: 0.0.44 node: 0.10.31 npm: 1.4.26

---

<div class="post-metadata">

### Author: ![joseph\_dillon\_522](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/joseph_dillon_522/32/9348_2.png) [@joseph\_dillon\_522](https://discuss.emberjs.com/u/joseph_dillon_522)
#### Post date: [September 8, 2014, 2:17pm UTC](https://discuss.emberjs.com/t/cant-install-ember-cli-without-root/6223/3 "2014-09-08T14:17:50Z")

</div>

I recently had to fix this issue on my own machine and, for someone not used to Bash and all the fun it can do, it was a bit annoying.

There were a couple of SO questions that helped:

1. [npm / yeoman install generator-angular without sudo](http://stackoverflow.com/questions/18212175/npm-yeoman-install-generator-angular-without-sudo)
2. [what is PATH on the MAC (UNIX) system](http://stackoverflow.com/questions/18409707/what-is-path-on-the-mac-unix-system)
3. [What does `echo prefix = ~/.node >> ~/.npmrc` mean?](http://stackoverflow.com/questions/21948653/what-does-echo-prefix-node-npmrc-mean)

[Heres what the CLI Docs say about it](http://www.ember-cli.com/#npm-package-manangement-with-sudo). In short, the CLI team purposefully does not support installing the CLI globally because installing something with SUO is a very unsafe practice.

---

<div class="post-metadata">

### Author: ![abuiles](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/abuiles/32/15106_2.png) [@abuiles](https://discuss.emberjs.com/u/abuiles)
#### Post date: [September 8, 2014, 5:29pm UTC](https://discuss.emberjs.com/t/cant-install-ember-cli-without-root/6223/5 "2014-09-08T17:29:31Z")

</div>

@ahmadhasankhan check the post here [The Ember CLI - Introduction - Ember CLI Guides](http://www.ember-cli.com/#tooling) it will help you install node and npm without requiring sudo.

---

<div class="post-metadata">

### Author: ![ahmadhasankhan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ahmadhasankhan/32/9509_2.png) [@ahmadhasankhan](https://discuss.emberjs.com/u/ahmadhasankhan)
#### Post date: [September 10, 2014, 7:52am UTC](https://discuss.emberjs.com/t/cant-install-ember-cli-without-root/6223/6 "2014-09-10T07:52:20Z")

</div>

Thanks @joseph_dillon_522 and @abuiles, problem has been solved, now i am using nvm, updraded Node version and CLI working fine 😄

---

<div class="post-metadata">

### Author: ![obroinb](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@obroinb](https://discuss.emberjs.com/u/obroinb)
#### Post date: [November 27, 2014, 7:44pm UTC](https://discuss.emberjs.com/t/cant-install-ember-cli-without-root/6223/7 "2014-11-27T19:44:39Z")

</div>

Follow this guide to install node without sudo [http://www.wenincode.com/installing-node-jsnpm-without-sudo/](http://www.wenincode.com/installing-node-jsnpm-without-sudo/)

I also needed to run sudo chown -R $USER:$GROUP ~/.npm
