# Stuck using ember-cli

**URL:** <https://discuss.emberjs.com/t/stuck-using-ember-cli/7462>\
**Category:** Uncategorized\
**Created:** [March 8, 2015, 6:15pm UTC](https://discuss.emberjs.com/t/stuck-using-ember-cli/7462 "2015-03-08T18:15:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![reynardh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/reynardh/32/10429_2.png) [@reynardh](https://discuss.emberjs.com/u/reynardh)\
**Post date:** [March 8, 2015, 6:15pm UTC](https://discuss.emberjs.com/t/stuck-using-ember-cli/7462/1 "2015-03-08T18:15:42Z")

</div>

I’ve been having problems after problems using ember-cli. At first I could install it and create new ember projects with it.

I can’t think what I have done since then, but now I’m getting this when calling `ember new app`

```auto
Error: Cannot find module '../function/makeIterator_'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/ember-cli/node_modules/bower/node_modules/mout/array/collect.js:2:20)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

```

So I uninstall and install ember-cli

```auto
sudo npm uninstall ember-cli -g
sudo npm install ember-cli -g

```

I get lots of warnings like this during installation

```auto
npm WARN engine makeerror@1.0.10: wanted: {"node":"0.6.x"} (current: {"node":"0.12.0","npm":"2.5.1"})
npm WARN engine tmpl@1.0.3: wanted: {"node":"0.6.x"} (current: {"node":"0.12.0","npm":"2.5.1"})
/usr/local/bin/ember -> /usr/local/lib/node_modules/ember-cli/bin/ember
npm WARN unmet dependency /usr/local/lib/node_modules/generator-angular/node_modules/yeoman-generator/node_modules/file-utils requires lodash@'~2.1.0' but will load

```

Now I’m getting this error when calling `ember new test-ember`

```auto
Installing packages for tooling via npm.../usr/local/lib/node_modules/ember-cli/node_modules/npm/lib/utils/locker.js:66
    throw new Error(
          ^
Error: Attempt to unlock /path/to/test-ember/node_modules/ember-cli-babel, which hasn't been locked
    at unlock (/usr/local/lib/node_modules/ember-cli/node_modules/npm/lib/utils/locker.js:66:11)
    at cb (/usr/local/lib/node_modules/ember-cli/node_modules/npm/lib/install.js:929:5)
    at /usr/local/lib/node_modules/ember-cli/node_modules/npm/lib/install.js:933:20
    at /usr/local/lib/node_modules/ember-cli/node_modules/npm/lib/utils/locker.js:40:9
    at cb (/usr/local/lib/node_modules/ember-cli/node_modules/npm/node_modules/lockfile/lockfile.js:149:38)
    at /usr/local/lib/node_modules/ember-cli/node_modules/npm/node_modules/lockfile/lockfile.js:177:38
    at OpenReq.Req.done (/usr/local/lib/node_modules/ember-cli/node_modules/bower-config/node_modules/graceful-fs/graceful-fs.js:143:5)
    at OpenReq.done (/usr/local/lib/node_modules/ember-cli/node_modules/bower-config/node_modules/graceful-fs/graceful-fs.js:63:22)
    at FSReqWrap.oncomplete (fs.js:99:15)

```

This seems to be node or npm problem, or maybe ember-cli. Does anyone have any suggestion how I should go about fixing this? maybe trying to clean install node and npm?

---

<div class="post-metadata">

**Author:** ![atsjj](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/atsjj/32/14817_2.png) [@atsjj](https://discuss.emberjs.com/u/atsjj)\
**Post date:** [March 8, 2015, 7:16pm UTC](https://discuss.emberjs.com/t/stuck-using-ember-cli/7462/2 "2015-03-08T19:16:10Z")

</div>

Trying doing `npm uninstall -g ember-cli`, followed by `npm cache clean`. Then try reinstalling. Also, you’ll want to try removing your `node_modules` directory and reinstalling local deps, if you’re testing for success within an existing project.

---

<div class="post-metadata">

**Author:** ![reynardh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/reynardh/32/10429_2.png) [@reynardh](https://discuss.emberjs.com/u/reynardh)\
**Post date:** [March 9, 2015, 1:25am UTC](https://discuss.emberjs.com/t/stuck-using-ember-cli/7462/3 "2015-03-09T01:25:26Z")

</div>

I did that and still get the same error message. I think I’m going to try completely removing npm and node.

---

<div class="post-metadata">

**Author:** ![michael\_deitcher](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/michael_deitcher/32/10120_2.png) [@michael\_deitcher](https://discuss.emberjs.com/u/michael_deitcher)\
**Post date:** [March 9, 2015, 5:31pm UTC](https://discuss.emberjs.com/t/stuck-using-ember-cli/7462/4 "2015-03-09T17:31:56Z")

</div>

If you are on a mac, you can avoid the sudo requirement by installing node.js with homebrew instead of the node.js installer.

> **[How to Install Node.js and NPM on a Mac](https://blog.teamtreehouse.com/install-node-js-npm-mac)**
>
> In this article, I'll take you through the process of installing Node.js and NPM on a Mac using Homebrew.

---

<div class="post-metadata">

**Author:** ![atsjj](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/atsjj/32/14817_2.png) [@atsjj](https://discuss.emberjs.com/u/atsjj)\
**Post date:** [March 9, 2015, 10:49pm UTC](https://discuss.emberjs.com/t/stuck-using-ember-cli/7462/5 "2015-03-09T22:49:40Z")

</div>

I think @michael_deitcher brings up a good point @reynardh. Did you `brew` your `node` install?

---

<div class="post-metadata">

**Author:** ![reynardh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/reynardh/32/10429_2.png) [@reynardh](https://discuss.emberjs.com/u/reynardh)\
**Post date:** [March 9, 2015, 11:19pm UTC](https://discuss.emberjs.com/t/stuck-using-ember-cli/7462/6 "2015-03-09T23:19:10Z")

</div>

no, I actually installed it manually before and then just upgraded it using the mac installer from nodejs. That’s why there are warnings that some node packages expect node 0.6, and might be what’s causing this problem. I’ll try to use homebrew after I do a clean uninstall of node and npm. Thanks for the help!

---

<div class="post-metadata">

**Author:** ![reynardh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/reynardh/32/10429_2.png) [@reynardh](https://discuss.emberjs.com/u/reynardh)\
**Post date:** [March 10, 2015, 6:25pm UTC](https://discuss.emberjs.com/t/stuck-using-ember-cli/7462/7 "2015-03-10T18:25:47Z")

</div>

ok after manually removing all node installation, I used `brew install node`, and now calling `ember new app` is working again. Thanks for the help.

I think what caused the problem was that I had used brew to install node before and then I ran the latest installer from node website to upgrade node.

---

<div class="post-metadata">

**Author:** ![mikepmunroe](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/mikepmunroe/32/15513_2.png) [@mikepmunroe](https://discuss.emberjs.com/u/mikepmunroe)\
**Post date:** [March 16, 2015, 12:09am UTC](https://discuss.emberjs.com/t/stuck-using-ember-cli/7462/8 "2015-03-16T00:09:05Z")

</div>

As an aside, it’s always great to review steps outlined by Robert Jackson when Ember-CLI updates are made public.

For each tagged release, he added steps to follow to get your node and bower states cleaned up and the new project files ready to go.

For example, see his ‘Project Update’ steps in [https://github.com/ember-cli/ember-cli/releases/tag/v0.1.15](https://github.com/ember-cli/ember-cli/releases/tag/v0.1.15)

If all else fails and you think you have some node stuff and bower cruft, run the following from command line to blow away everything for node and bower, then reinstall

`npm cache clear && bower cache clean && rm -rf node_modules bower_components && npm install && bower install`

---

<div class="post-metadata">

**Author:** ![THuRStoN](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/thurston/32/15524_2.png) [@THuRStoN](https://discuss.emberjs.com/u/THuRStoN)\
**Post date:** [March 17, 2015, 5:11pm UTC](https://discuss.emberjs.com/t/stuck-using-ember-cli/7462/9 "2015-03-17T17:11:15Z")

</div>

For having node installed and quickly manage different versions of node (iojs) & npm, I use NVM it’s a pretty impressive tool: [https://github.com/creationix/nvm](https://github.com/creationix/nvm)

It can handle different global modules installed, and you can copy packages quickly from one version to another.
