Ember-cli: Error: EEXIST, file already exists

Created on 4 Mar 2015  ยท  133Comments  ยท  Source: ember-cli/ember-cli

file changed templates/application.hbs
EEXIST, file already exists '/Users/fivetwentysix/testapp/tmp/caching-writer-dest-dir_GE6biD.tmp'
Error: EEXIST, file already exists '/Users/fivetwentysix/testapp/tmp/caching-writer-dest-dir_GE6biD.tmp'
    at Error (native)
    at Object.fs.symlinkSync (fs.js:852:18)
    at symlink (/Users/fivetwentysix/testapp/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:82:14)
    at Function.symlinkOrCopySync (/Users/fivetwentysix/testapp/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:58:5)
    at /Users/fivetwentysix/testapp/node_modules/ember-cli/node_modules/broccoli-sourcemap-concat/node_modules/broccoli-caching-writer/index.js:103:21
    at lib$rsvp$$internal$$tryCatch (/Users/fivetwentysix/testapp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:489:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/fivetwentysix/testapp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:501:17)
    at lib$rsvp$$internal$$publish (/Users/fivetwentysix/testapp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:472:11)
    at lib$rsvp$asap$$flush (/Users/fivetwentysix/testapp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:1290:9)
    at process._tickCallback (node.js:355:11)

Happens when I save any file with ember serve running.

This happens on a brand new project created with ember-cli-0.1.15

Here's a sample repo: https://github.com/fivetwentysix/ember-test-app

Most helpful comment

I also ran into this error while using ember-cli-coffeescript and trying to add ember-simple-auth. The solution was to convert my routes/application.coffee back to JavaScript. For some reason the default application route in ember-simple-auth conflicts with the one written in CoffeeScript.

All 133 comments

This is happening to me too. Fresh app with 0.1.2-beta.1. Maybe something has changed in a dependency upstream?

https://gist.github.com/Soliah/edc8f012cc9e6800005d

I'm getting this too, tried with multiple versions of ember-cli. Not using outputPaths as far as I know, just a plain old ember new myapp.

@fivetwentysix aside from stopping the server prior to making changes, have you found any sort of work around for this?

I'm experiencing it too in an unadulterated stock ember app on:

version: 0.2.0-beta.1
node: 0.12.0
npm: 2.1.8

@btecu no outputPaths here. Obviously it's referenced in node_modules/ember-cli/lib/broccoli/ember-app.js but the app i just tested on is a fresh install of ember cli, a newed up app, and no modifications other than rewriting a project file out.

Probably a bad idea, but what I did to get around this problem was editing app/node_modules/ember-cli/node_modules/symlink-or-copy/copy-dereference/index.js and replace
fs.writeFileSync(dest, contents, { flag: 'wx', mode: srcStats.mode }) with
fs.writeFileSync(dest, contents, { flag: 'w', mode: srcStats.mode })

Restart ember server afterwards...

@bobbyhubbard are you sure it's the same bug? https://github.com/joyent/node/issues/8651 says it was fixed in node: 0.12.0 and i'm definitely seeing it with that version.

Hi folks - an hour ago, I did an npm update in my project directory. Immediately afterward, I started noticing the same crashing behaviour after changing a file while serving. Like others here, I suspect this has to do with an upstream dependency completely breaking everything, but I have no idea which one it could be. Would it be useful to share the contents of package.json here?

(For the record, the 'already existing' file is tmp/class-tmp_cache_dir-85EAruZ0.tmp , which is only relevant in that it's also a tmp/... file. The last step in the trace is Object.fs.symlinkSync. Would be happy to share the rest of the trace if it'll help.)

This is why npm needs something similar to gemfile.lock

If I knew how to reverse / undo npm update, I'd do it in a heartbeat. I can't even parse the output of the command, it's just a jumble of different dependency trees and conflict warnings. Every time I think "maybe Javascript has finally matured," something like this happens, the whole building topples, and I yearn for a classic, vetted language with a massive standard library.

I'm getting this too. I'm not sure if this works but if you specify "rimraf":"2.2.8" in package.json, it fixes.
rimraf 2.3.0 is just released about 7 hours ago from now.

Confirming @dopin's suggestion of forcing rimraf to 2.2.8 works. Make sure to add this to dependencies and not devDependencies.

@dopin's suggestion did not work for me. I tried cloning (broken), installing (broken), open old files (worked). Something new in the way that cache files are stored. If I just delete all the cache files with the commonatliy of "caching-writer-dest-dir{otherjunkhere}" then it saved ONCE fine. Next time back to broken.

Hitting this too just in the last few hours, yikes yikes...

thats the danger of being an early adopter ;)

Yup, same here. I just updated Ember to 1.11 beta. If I go back to 1.10, will this go away?
EDIT: No it doesn't. Ignore the referenced issue.

EDIT2: It appears that there is an issue when the project is being watched. If I run ember build manually, every time, I don't get any errors.

@dopin 's fix works for me too.
Additional information:
npm install with rimraf v2.3.0:

npm WARN unmet dependency /home/{*}/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.1' but will load
npm WARN unmet dependency /home/{*}/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /home/{*}/node_modules/broccoli-es6modules/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.1' but will load
npm WARN unmet dependency /home/{*}/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /home/{*}/node_modules/broccoli-es6modules/node_modules/esperanto/node_modules/sander/node_modules/rimraf requires glob@'^4.4.1' but will load
npm WARN unmet dependency /home/{*}/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /home/{*}/node_modules/broccoli-sourcemap-concat/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.1' but will load
npm WARN unmet dependency /home/{*}/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5

Same here!

file changed controllers/journey.js
EEXIST, file already exists '/Users/pro/Workbench/Centrica/Github/home-move/tmp/class-tmp_cache_dir-fIzB9FpE.tmp'
Error: EEXIST, file already exists '/Users/pro/Workbench/Centrica/Github/home-move/tmp/class-tmp_cache_dir-fIzB9FpE.tmp'
    at Object.fs.symlinkSync (fs.js:741:18)
    at symlink (/Users/pro/Workbench/Centrica/Github/home-move/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:82:14)
    at Function.symlinkOrCopySync [as sync] (/Users/pro/Workbench/Centrica/Github/home-move/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:58:5)
    at /Users/pro/Workbench/Centrica/Github/home-move/node_modules/ember-cli/node_modules/broccoli-sourcemap-concat/node_modules/broccoli-caching-writer/index.js:103:21
    at lib$rsvp$$internal$$tryCatch (/Users/pro/Workbench/Centrica/Github/home-move/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:489:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/pro/Workbench/Centrica/Github/home-move/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:501:17)
    at lib$rsvp$$internal$$publish (/Users/pro/Workbench/Centrica/Github/home-move/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:472:11)
    at Object.lib$rsvp$asap$$flush [as _onImmediate] (/Users/pro/Workbench/Centrica/Github/home-move/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:1290:9)
    at processImmediate [as _immediateCallback] (timers.js:345:15)

I confirm that specifying "rimraf":"2.2.8" as a dependency fixed it.

Hey guys,

I tried it with "rimraf":"2.3.0" - still getting the same issue.

I tried it with both ember-cli 0.1.15 and 0.2.0-beta.1.

version: 0.2.0-beta.1
node: 0.12.0
npm: 2.1.8

@badazz91 Try rimraf 2.2.8 not 2.3.0

@olivierlesnicki - Could you update your comment? It should be 'rimraf' but you've put 'rifraf'

@olivierlesnicki ok using

`"rimraf":"2.2.8"`` as a dependency and a fresh npm install did the trick.

Also I noticed, that if you are using broccoli-sass and node 0.12.0 you need to make sure that you are using this version

"broccoli-sass": "^0.4.0" in your package.json

Thanks.

So, I totally don't even know what rimraf is, but this did the trick for me.
Thanks, all!

After adding "rimraf":"2.2.8" in my package.json everything started working. Thanks @dopin

I confirm that the issue was resolved after adding "rimraf":"2.2.8" as a dependency and redoing npm

Yup. Thanks @dopin! Adding "rimraf":"2.2.8" as a dependency worked for me too.

@jmurphyau done!

Can confirm adding "rimraf":"2.2.8" has worked for me too :+1:

Edit:

OS: OS X 10.9.2 (Mavericks)
ember-cli version: 0.1.15
node: 0.10.36
npm: 2.1.8

Is this a bug in rimraf? Should we tell it?

@ahx I guess so.

I had the same error and fixed it by removing my .cache directory

I'm actually seeing the same as @JohnRodney -- adding "rimraf":"2.2.8" did not fix the issue.

Thanks to other people's comments, here's what I did to successfully work around the problem using:

โžœ  mustache git:(develop) โœ— ember --version
version: 0.2.0-beta.1
node: 0.12.0
npm: 2.1.8

os: Yosemite 10.10.2 

1- Updated package.json with:

  "dependencies": {
    "rimraf": "2.2.8"
  },

2- โžœ mustache git:(develop) โœ— rm -rf node_modules tmp dist && npm cache clean

3- โžœ mustache git:(develop) โœ— ember install

I start up the server and see the same issue.

I'm using node 0.12.0 and also tried @badazz91 's suggestion to use "broccoli-sass": "^0.4.0" -- still happens.

Have i missed something?

@mariozig rm -rf tmp dist ?

Can people seeing this issue update this thread with OS, node, npm, versions etc. I'll see what I can do about reproducing and fixing today.

@raytiley Here's mine:
OS: Mac Yosemite
Node: v0.10.36
npm: 1.4.28
ember-cli: v0.1.15

@dopin @raytiley I'm good to go now -- thank you! Updated my comment with version and (hopefully) some useful info for others.

OS: Windows 8.1
Node: v0.12.0
npm: 2.5.1
ember-cli: v0.1.15

ember-cli: 0.2.0-beta.1
node: v0.12.0
npm: 2.5.1

my package.json:

{
  "name": "web",
  "version": "0.0.0",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "test"
  },
  "scripts": {
    "start": "ember server",
    "build": "ember build",
    "test": "ember test"
  },
  "engines": {
    "node": ">= 0.10.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "broccoli-asset-rev": "^2.0.0",
    "ember-cli": "0.2.0-beta.1",
    "ember-cli-app-version": "0.3.1",
    "ember-cli-babel": "^4.0.0",
    "ember-cli-coffeescript": "0.9.1",
    "ember-cli-content-security-policy": "0.3.0",
    "ember-cli-dependency-checker": "0.0.7",
    "ember-cli-html5-validation": "0.0.16",
    "ember-cli-htmlbars": "0.7.4",
    "ember-cli-ic-ajax": "0.1.1",
    "ember-cli-inject-live-reload": "^1.3.0",
    "ember-cli-qunit": "0.3.7",
    "ember-cli-sass": "3.1.0",
    "ember-cli-uglify": "1.0.1",
    "ember-data": "1.0.0-beta.14.1",
    "ember-export-application-global": "^1.0.2",
    "ember-idx-button": "^0.1.3",
    "ember-idx-forms": "^0.5.1",
    "ember-json-api": "^0.2.3",
    "ember-template-compiler": "^1.8.0",
    "ember-validations": "^2.0.0-alpha.2",
    "express": "^4.8.5",
    "glob": "4.0.5",
    "handlebars": "^1.3.0",
    "originate": "0.1.5"
  }
}

hope it helps.. nothing so far helped me to avoid this error... i just upgraded to ember cli beta from 0.1.15, I had the error with that version as well I even tried to downgrade to node 0.10, but that also didn't fix the error ...

@wwwdata you could try these steps for a temp fix/workaround: https://github.com/ember-cli/ember-cli/issues/3413#issuecomment-77190182

OS: OSX Yosemite
Node: v0.12.0
ember-cli: v0.1.15

npm --version reports 2.5.1 but ember --version reports 2.1.8. I'm using nvm, so maybe that is the reason?

Following @mariozig steps gave me this error :
C:\xampp\htdocs\tugg>rm -rf node_modules tmp dist && npm cache clean

C:\xampp\htdocs\tugg>ember install
version: 0.1.15
Installed browser packages via Bower.
Installing packages for tooling via npm..fs.js:988
binding.chown(pathModule._makeLong(path), uid, gid, req);
^
TypeError: uid must be an unsigned int
at TypeError (native)
at Object.fs.chown (fs.js:988:11)
at Object. (C:\Users\mohamed.zaghloul\AppData\Roaming\npm\node_modules\ember-cli\node_mod
ules\bower-config\node_modules\graceful-fs\polyfills.js:131:17)
at Object. (C:\Users\mohamed.zaghloul\AppData\Roaming\npm\node_modules\ember-cli\node_mod
ules\bower\node_modules\bower-registry-client\node_modules\graceful-fs\polyfills.js:131:17)
at Object.chown (C:\Users\mohamed.zaghloul\AppData\Roaming\npm\node_modules\ember-cli\node_modules\b
ower\node_modules\bower-json\node_modules\graceful-fs\polyfills.js:131:17)
at C:\Users\mohamed.zaghloul\AppData\Roaming\npm\node_modules\ember-cli\node_modules\npm\node_module
s\chownr\chownr.js:12:43
at ReaddirReq.Req.done (C:\Users\mohamed.zaghloul\AppData\Roaming\npm\node_modules\ember-cli\node_mo
dules\bower\node_modules\bower-json\node_modules\graceful-fs\graceful-fs.js:143:5)
at ReaddirReq.done (C:\Users\mohamed.zaghloul\AppData\Roaming\npm\node_modules\ember-cli\node_module
s\bower\node_modules\bower-json\node_modules\graceful-fs\graceful-fs.js:90:22)
at ReaddirReq.Req.done (C:\Users\mohamed.zaghloul\AppData\Roaming\npm\node_modules\ember-cli\node_mo
dules\bower\node_modules\bower-registry-client\node_modules\graceful-fs\graceful-fs.js:143:5)
at ReaddirReq.done (C:\Users\mohamed.zaghloul\AppData\Roaming\npm\node_modules\ember-cli\node_module
s\bower\node_modules\bower-registry-client\node_modules\graceful-fs\graceful-fs.js:90:22)

Hey, folks. rimraf author here.

I've re-pointed the "latest" tag at [email protected] which should address new fresh installs.

Can anyone drop some details into isaacs/rimraf#65 about how this is manifesting? Is it failing to remove something that it should?

I suspect that it may be related to https://github.com/isaacs/node-glob/issues/170, perhaps it's failing to see a symlink that points to a missing dir, and then not unlinking it?

@isaacs thanks for the update. I'm working on isolating what's causing the failure now. I'll update when I figure something out.

I'm running Ember-CLI on Nitrous.io IDE:
Node: 0.10.26
NPM: 1.4.3
Ember: 0.2.0-beta.1

The project compile fine on the first run. But as soon as a change on the of app file, it crash. I run ember-cli on port 3000 (ember serve -port 3000). It also tell me that "could not find watchman, failing back to NodeWatcher for file system events"

I just started this new project on Nitrous today. All the nodes, npm and ember were freshly installed today.

Error:
EEXIST, file already exists '/home/action/mktk/tmp/class-tmp_cache_dir-YFUpnEom.tmp'
Error: EEXIST, file already exists '/home/action/mktk/tmp/class-tmp_cache_dir-YFUpnEom.tmp'
at Object.fs.symlinkSync (fs.js:730:18)
at symlink (/home/action/mktk/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:82:14)
at Function.symlinkOrCopySync as sync
at /home/action/mktk/node_modules/ember-cli/node_modules/broccoli-sourcemap-concat/node_modules/broccoli-caching-writer/index.js:103:21
at lib$rsvp$$internal$$tryCatch (/home/action/mktk/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:489:16)
at lib$rsvp$$internal$$invokeCallback (/home/action/mktk/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:501:17)
at lib$rsvp$$internal$$publish (/home/action/mktk/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:472:11)
at Object.lib$rsvp$asap$$flush as _onImmediate
at processImmediate as _immediateCallback

tks

@mariozig adding the rimraf package worked for me!

Ember CLI does not have a direct dependency on rimraf anymore as it was removed in #3101. So there is some transitive dependency that is causing this.

Can some one try to prune and dedupe the dependencies and see if you can get an offending module?

cd my-failing-application
npm prune
npm dedupe
ember serve

Just adding another data point. Saw the error on a fresh ember app yesterday, downgrading rimraf to 2.2.8 fixes it. https://github.com/isaacs/node-glob/issues/170 seems like a promising lead?

@chadhietala

โžœ  console-client git:(master) โœ— npm prune
npm dedupe
โžœ  console-client git:(master) โœ— npm dedupe
โžœ  console-client git:(master) โœ— ember serve
version: 0.1.15
Livereload server on port 35729
Serving on http://0.0.0.0:4200/

Build successful - 8365ms.

Slowest Trees                  | Total
-------------------------------+----------------
Concat: Vendor                 | 2626ms
Babel                          | 1108ms
JSHint app- QUnit              | 748ms
ES3SafeFilter                  | 614ms
ES6: App Tree                  | 582ms

file changed templates/units/index.hbs
EEXIST, file already exists '/Users/fivetwentysix/work/console-client/tmp/caching-writer-dest-dir_b65YUo.tmp'
Error: EEXIST, file already exists '/Users/fivetwentysix/work/console-client/tmp/caching-writer-dest-dir_b65YUo.tmp'
  at Error (native)
  at Object.fs.symlinkSync (fs.js:852:18)
  at symlink (/Users/fivetwentysix/work/console-client/node_modules/ember-cli-less/node_modules/broccoli-less-single/node_modules/broccoli-caching-writer/node_modules/symlink-or-copy/index.js:82:14)
  at Function.symlinkOrCopySync (/Users/fivetwentysix/work/console-client/node_modules/ember-cli-less/node_modules/broccoli-less-single/node_modules/broccoli-caching-writer/node_modules/symlink-or-copy/index.js:58:5)
  at /Users/fivetwentysix/work/console-client/node_modules/ember-cli-less/node_modules/broccoli-less-single/node_modules/broccoli-caching-writer/index.js:103:21
  at lib$rsvp$$internal$$tryCatch (/Users/fivetwentysix/work/console-client/node_modules/ember-cli-less/node_modules/broccoli-less-single/node_modules/rsvp/dist/rsvp.js:489:16)
  at lib$rsvp$$internal$$invokeCallback (/Users/fivetwentysix/work/console-client/node_modules/ember-cli-less/node_modules/broccoli-less-single/node_modules/rsvp/dist/rsvp.js:501:17)
  at lib$rsvp$$internal$$publish (/Users/fivetwentysix/work/console-client/node_modules/ember-cli-less/node_modules/broccoli-less-single/node_modules/rsvp/dist/rsvp.js:472:11)
  at lib$rsvp$asap$$flush (/Users/fivetwentysix/work/console-client/node_modules/ember-cli-less/node_modules/broccoli-less-single/node_modules/rsvp/dist/rsvp.js:1290:9)
  at process._tickCallback (node.js:355:11)

Hey everyone... Fresh installs as of 45 minutes ago should work (make sure you node cache clear).

The problem is 'broccoli-caching-writeris callingrimrafwith a broken symlink. Due to a combination of a bug with node-glob (isaacs/node-glob#170 ) ~~and thatbroccoli-caching-writer` is not calling rimraf with the correct options to remove the broken symlink.~~ Once these issues are resolved rimraf 2.3.0 should work, and provide a more reliable experience for our windows users.

I am still trying to track down where that broken symlink is coming from.

Correction
Just realized that broccoli-caching-writer isn't responsible at all. Trying to pay attention to an emberconf talk and debug this at the same time.

@raytiley confirmed

rm -Rf node_modules tmp dist bower_components
ember serve

worked for me

@fivetwentysix great. I wanna keep this open until we can confirm that rimraf 2.3.0 works and I figure out where the broken symlink is coming from.

Working for me too

Upgrading Ember-Cli from 0.1.15 to 0.2.0beta-1 fixed the issue for me

@msalahz ember-cli 0.1.15 still works for me

@fivetwentysix I tried another machine with ember-cli 0.1.15 and I did
rm -Rf node_modules tmp dist bower_components and ember install and everything worked with me

0.2.0-beta.1 works as well

I tried rm -Rf node_modules tmp dist bower_components and ember install on ember-cli 0.2.0-beta.1 and everything is working fine now.

Can anyone affected by this please confirm that rimraf 2.3.1 (just released) no longer has this bug?

Thanks!

@isaacs I'll pull it down as soon as I find some internet.

@isaacs @raytiley Thanks for your work! I just tried it.
It works by specifing rimraf:2.3.1 as dependency now!
But if I remove it, it fails with the same EEXIST error even if rimraf:2.3.0 not listed in npm list |grep rimraf.

@dopin have you tried clearing your npm cache? The fix is actually in node-glob (https://github.com/isaacs/node-glob/commit/4fd4a48aeb6eb71cb6fdd09d181adf1abc2f03b9) so you may be getting some weird behavior if you don't have a specific version of rimraf.

@isaacs 2.3.1 is looking good for me. 2.3.0 is working fine as well since its pulling in the latest node-glob. Thanks again for fixing this so quickly.

@raytiley Yes, I removed the cache. And I also tried specifying rimraf:2.3.0 now and it works. I'm so sorry for my mistaking. @isaacs :pensive:

@raytiley Should this also work without specifying a rimraf version after an npm cache clean?

@max I believe so. I haven't tested that specifically but will later tonight or first thing in the morning.

@raytiley Can't get it to work without specifying rimraf and for the life of me don't know why.

@raytiley We still need to specify rimraf:2.3.1 as a dependencies to get ember-cli to work out of the box. Fresh Install. Cache Cleared.

Hey all. I'll look into what's happening as soon as I can.

:+1:

Yup, specifying rimraf:2.3.1 in the package.json fixes the issue. :+1:

Experiencing this issue a fresh app. Cleaned npm cache.

ember-cli 0.1.15
node 0.10.35
npm 1.4.28
os x 10.10.2

@adamsrog Can you please run these two commands and share the output?

npm ls rimraf
npm ls glob

Thanks.

I think I found it:

"glob": "4.0.5",

(https://github.com/ember-cli/ember-cli/blob/master/package.json#L115)
should be something like:

"glob": "^4.4.1",

Source:
npm ls glob -> [email protected] invalid and

npm WARN unmet dependency /home/{*}/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.1' but will load
npm WARN unmet dependency /home/{*}/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /home/{*}/node_modules/broccoli-es6modules/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.1' but will load
npm WARN unmet dependency /home/{*}/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /home/{*}/node_modules/broccoli-es6modules/node_modules/esperanto/node_modules/sander/node_modules/rimraf requires glob@'^4.4.1' but will load
npm WARN unmet dependency /home/{*}/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /home/{*}/node_modules/broccoli-sourcemap-concat/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.1' but will load
npm WARN unmet dependency /home/{*}/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5

Does that make any sense?

@fivetwentysix that didn't work for me

Ok, I've a repo that i cloned into 2 different machines, both with windows 7, node v0.12, and ember-cli 0.1.15

On one machine the problem's not present, in the other yes.
the only difference in the node_modules is the glob verion:

  • in the working is 4.4.1
  • in the not working is 4.4.2

P.S. @isaacs I cannot install [email protected] why? npm ERR! version not found: [email protected]

Ran into this issue after removing node_modules/ and reinstalling them.

Is there a reliable way to resolve this?

I'll close this once we release the fix. Sorry its taking a while everyone... Should be published later today. for now you can follow the instructions here to lock into rimraf 2.2.8 (https://github.com/ember-cli/ember-cli/issues/3413#issuecomment-77190182

@Fed03 I unpublished [email protected] because it's broken, and renders rimraf unable to delete files, without providing any warnings (since the first rimraf version that depended on glob would accept 4.4.1, and the fixed version of glob is 4.4.2.)

I suspect that you are encountering a different issue. Can you provide any more details about what isn't being deleted? Also, can you share the output of npm ls rimraf; npm ls glob?

@lolmaus Can you explain exactly what you mean by "this issue"? Is a file not being deleted by rimraf? Which version of rimraf? npm ls rimraf; npm ls glob

@adamsrog The issue is that you have some copies of [email protected] in there, which pulls in glob to do pattern matching. However, i'ts getting a version of glob that didn't properly expand to symlinks if those symlinks point to an invalid target, so it's failing to delete those things (since it thinks that they're already gone).

The solution is to fix those warnings that npm is throwing at you. The simplest solution is to re-install anything that points at rimraf.

Everyone: the fix here is _not_ to roll rimraf back to 2.2.8. If you are still being affected by this, you have a broken version of glob in there, _which is bound to cause other problems_. Another solution is to put "glob":"^4.4.2" in your top-level dependencies, and then either re-install, or run npm dedupe to squash everything and make them all share the same deps.

Hi,

Sadly, we have followed the instructions in this thread but are still seeing the problem. We do not have [email protected] anywhere in our tree. We see only rimraf 2.2.8 and 2.3.1 in our tree (we added 2.3.1 at the top, but dedupe does not change the 2.2.8's).

Is anyone else still seeing the error after following the instructions in this thread?

PS Thanks for the quick turnaround on looking into all this :)

@neo-tahi I need to know what isn't being deleted. Can you provide a repro case?

@isaacs The issue (failing incremental rebuilds when running ember serve) can be easily reproduced as of a few minutes ago:

EDIT: install ember-cli first of course: npm install -g ember-cli (currently installs v0.2.0-beta.1)

$ npm cache clean
$ ember new app && cd app
$ ember serve

From another terminal in the same cwd:

# change any file in app/
$ touch config/environment.js

Which results in an error that looks like:

EEXIST, file already exists '/tmp/app/tmp/caching-writer-dest-dir_yxETHi.tmp'

Thanks, @slindberg, I'll take a look.

It seems like the ember new app is dumping some stuff into node_modules that is invalid. I'm not sure how it's doing that, but there's your problem. Even before running ember serve or touching any files, I see this:

$ npm ls rimraf glob
npm WARN unmet dependency /Users/isaacs/dev/js/x/app/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.2' but will load
npm WARN unmet dependency /Users/isaacs/dev/js/x/app/node_modules/ember-cli/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /Users/isaacs/dev/js/x/app/node_modules/ember-cli/node_modules/broccoli-es6modules/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.2' but will load
npm WARN unmet dependency /Users/isaacs/dev/js/x/app/node_modules/ember-cli/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /Users/isaacs/dev/js/x/app/node_modules/ember-cli/node_modules/broccoli-es6modules/node_modules/esperanto/node_modules/sander/node_modules/rimraf requires glob@'^4.4.2' but will load
npm WARN unmet dependency /Users/isaacs/dev/js/x/app/node_modules/ember-cli/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /Users/isaacs/dev/js/x/app/node_modules/ember-cli/node_modules/broccoli-sourcemap-concat/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.2' but will load
npm WARN unmet dependency /Users/isaacs/dev/js/x/app/node_modules/ember-cli/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
[email protected] /Users/isaacs/dev/js/x/app
โ”œโ”€โ”ฌ [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]
โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ [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]
โ”‚ โ”œโ”€โ”€ [email protected]  invalid
โ”‚ โ”œโ”€โ”ฌ [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]
โ”‚ โ””โ”€โ”ฌ [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]
โ”‚     โ””โ”€โ”ฌ [email protected]
โ”‚       โ””โ”€โ”€ [email protected]
โ”œโ”€โ”ฌ [email protected]
โ”‚ โ””โ”€โ”ฌ [email protected]
โ”‚   โ””โ”€โ”ฌ [email protected]
โ”‚     โ””โ”€โ”ฌ [email protected]
โ”‚       โ””โ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected]

npm ERR! invalid: [email protected] /Users/isaacs/dev/js/x/app/node_modules/ember-cli/node_modules/glob

Running these three commands fixes up the situation:

npm i broccoli-sourcemap-concat # not sure why that's getting outdated glob
npm explore ember-cli -- npm i glob@latest -S
npm explore ember-cli -- npm i bower

And then npm ls once again reports a clean bill of health.

If I remember correctly, ember-cli bundles its dependencies, so probably there needs to be a fix in ember itself to make this happen?

I'd recommend adding a prepublish script to ember's package to run npm ls, so that nothing can be published with invalid dependencies.

@isaacs thanks for all the help. Sorry this has been such a pain. Emberconf just wrapped up and most of the people that would jump on fixing this are at the conference, traveling, or in meetings. I'm doing the best I can to wrap my head around what is locked on what versions.

From what I understand certain modules need to have glob locked down (https://github.com/broccolijs/broccoli-kitchen-sink-helpers/issues/27) because there is currently no follow all option for symlinks (https://github.com/isaacs/node-glob/issues/139).

Currently if we don't lockdown rimraf to 2.2.8 it causes our CI to fail. We definitely want to get the latest versions of glob / rimraf compatible. Just figuring out the best way to make that happen quickly

@raytiley issue started ocuring again

@raytiley If you can't lock down glob, then re-install rimraf in there, so that it will pull in its own copy of glob.

@raytiley Basically, if you make all the npm ls warnings go away, then everything works fine.

@isaacs - We cannot use latest glob (4.3+ vs 4.0.5) because the symlink following behavior was changed, and Broccoli depends on the (then stable and supported) behavior of glob to match things nested in symlinked folders.

Some detail links:

@rwjblue Sure, in that case, you can have Broccoli install rimraf, and that'll pull in a copy of glob that works. The problem is that ember-cli ships a bunch of bundled dependencies that are explicitly broken, according to their authors. Resolve those warnings, and this bug disappears.

@isaacs I apologize if I'm being thick here, but the problem persists even without the bundled dependencies. I'm currently have ember-cli linked locally. And there are no warnings when running npm ls

ember-cli ((detached from v0.1.15)) โšก๏ธŽ npm ls glob
[email protected] /Users/raytiley/code/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] 
โ”œโ”€โ”ฌ [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] 

If I do an ember new then rm -rf node_modules and do a fresh npm install I get warnings. The bundled dependencies shouldn't be playing any part here right?

poo (master) โšก๏ธŽ npm ls glob
npm WARN unmet dependency /Users/raytiley/poo/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.2' but will load
npm WARN unmet dependency /Users/raytiley/poo/node_modules/ember-cli/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /Users/raytiley/poo/node_modules/ember-cli/node_modules/broccoli-es6modules/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.2' but will load
npm WARN unmet dependency /Users/raytiley/poo/node_modules/ember-cli/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /Users/raytiley/poo/node_modules/ember-cli/node_modules/broccoli-es6modules/node_modules/esperanto/node_modules/sander/node_modules/rimraf requires glob@'^4.4.2' but will load
npm WARN unmet dependency /Users/raytiley/poo/node_modules/ember-cli/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
npm WARN unmet dependency /Users/raytiley/poo/node_modules/ember-cli/node_modules/broccoli-sourcemap-concat/node_modules/broccoli-caching-writer/node_modules/rimraf requires glob@'^4.4.2' but will load
npm WARN unmet dependency /Users/raytiley/poo/node_modules/ember-cli/node_modules/glob,
npm WARN unmet dependency which is version 4.0.5
[email protected] /Users/raytiley/poo
โ”œโ”€โ”ฌ [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] 
โ”‚ โ”œโ”€โ”€ [email protected]  invalid
โ”‚ โ”œโ”€โ”ฌ [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]
โ”‚   โ”‚   โ””โ”€โ”€ [email protected] 
โ”‚   โ”œโ”€โ”ฌ [email protected]
โ”‚   โ”‚ โ””โ”€โ”€ [email protected] 
โ”‚   โ””โ”€โ”ฌ [email protected]
โ”‚     โ””โ”€โ”ฌ [email protected]
โ”‚       โ””โ”€โ”€ [email protected] 
โ””โ”€โ”€ [email protected] 

npm ERR! invalid: [email protected] /Users/raytiley/poo/node_modules/ember-cli/node_modules/glob

Thanks again for being so helpful.

@isaacs

@rwjblue Sure, in that case, you can have Broccoli install rimraf, and that'll pull in a copy of glob that works. The problem is that ember-cli ships a bunch of bundled dependencies that are explicitly broken, according to their authors.

The usage of rimraf is not by Broccoli itself, so Broccoli cannot lock it down. The Broccoli helper API is setup roughly so that the consumer of Broccoli instantiates "helpers" that do the actual work. All of those helpers have their own versions of rimraf which may or may not be permissive enough to grab the new version that is invalid in our use case.

Resolve those warnings, and this bug disappears.

The warnings are not the fundamental issue, the warnings are basically indicating that we are forcing the glob package (and now rimraf) to a specific version because (to my knowledge) the glob package does not actually follow semver (it matches the Bash version) so comparing versions via semver package is incorrect...

The problem is that ember-cli ships a bunch of bundled dependencies that are explicitly broken, according to their authors.

@isaacs I'm curious how bundledDependencies suddenly break, don't they remain fixed or are they considered when dedupe happens.

Sudden failures do to instability in the larger ecosystem are extremely costly, short of shipping people a primed tarbal of npm/node/node_modules I am at a loss for how to improve the current state of things.

We had once talked, and you described ember-cli as more of an app distributed by npm rather then a typical module, hence our use of bundledDependencies. My question is, should we actually take this one step further and actually just distributed it outside of npm?

Anyways, I would like to work with you and the rest of NPM to help sort out some of out pains.

@rwjblue The glob package follows SemVer. It matches Bash 4.3, the fact that it is also in the 4.x version cycle is indicative of the number of breaking API changes that have been made to it over the years, it's just a coincidence.

The usage of rimraf is not by Broccoli itself, so Broccoli cannot lock it down.

Fair enough. Whatever the case, somehow a version of rimraf is installed that does require('glob') and the glob that it's being given is not the glob it wants. The warnings from npm ls are indicative of this fact.

The core bug in rimraf and glob has already been fixed. What's left to do is stop serving rimraf a known-broken version of glob. I could also back-port the broken-symlink fix to every prior version of glob, but that is costly and dangerous, since the code has changed quite a bit since then, and even still, it won't help things without shipping a new ember-cli.


So, here's where things stand now. I'm not entirely certain where the bug is coming from, but it'd be _great_ to comb out some of this mess.

When I do ember new app, I get a broken node_modules setup. However, when I cd into that folder, and delete the modules folder, and run npm i to install from the package.json file, I see a bunch of errors all stemming from _one_ issue. At the very least, it seems surprising to me that I get completely different stuff in node_modules based on which of those approaches I use. What is ember-cli doing when you type ember new app? It says it's fetching stuff from npm, is it using npm to do that?

In the world where I npm install from the generated package.json file, I see this:

  1. ember-cli has a bundleDependency on glob, which in the latest publish is at version 4.0.5.
  2. ember-cli also depends on a few things that depend on new versions of rimraf, it seems like npm isn't noticing at install time that the [email protected] is invalid or something?

https://github.com/npm/npm/issues/7552 is the npm issue to investigate the npm part of it.

It says it's fetching stuff from npm, is it using npm to do that?

yes, it is invoking NPM, but a quick look indicates we aren't using the latest version.

https://github.com/ember-cli/ember-cli/blob/master/package.json#L128

let me update this.

@isaacs - I disagree that glob follows SemVer (if it did then it should not have had breaking changes from 4.0.0 until 5.0.0), but it is not useful to debate globs versioning system in this issue, I am sorry for that silly diversion.

The issue reported here (getting the EEXISTS error) is temporarily resolved with https://github.com/ember-cli/ember-cli/pull/3428, by locking [email protected] and [email protected]. I will try to fix the last blocking issue for 0.2.0 final in the next hour or so, and release it.

@rwjblue "Breaking changes" mean changes that alter the API surface such that previously intended behavior is no longer intended. It's not just "any change to existing behavior".

If a software program does not behave as intended and documented, then bringing the behavior into alignment with the documented intent is not a "breaking change" is it "fixing a bug". It is inevitable that users of a piece of software will occasionally come to depend on unintended, undefined, or incorrect behavior, and when the bug is corrected, this may have unfortunate consequences. But that does not mean that the letter or spirit of SemVer has been violated.

All of the libraries I maintain, including glob, "follow SemVer". I helped with the specification, and wrote the implementation we're all using. I feel very strongly about it. The explicit goal of glob 4.x was to match the behavior of Bash 4.3, and it has taken a few releases to get closer and closer to that goal. Most recently, I made a change to match broken symlinks. If anyone was depending on that bug, then they would be disappointed, and perhaps call it a "breaking change". But it is a bugfix, as was the change to have it not continue down cyclical symlinks until ELOOP.

I'd also rather not have an in-depth back and forth on the subtleties of SemVer in an unrelated issue thread, so this is the last I'll say on it.

@isaacs - We have similar but slightly different interpretations (which is totally fine), again I apologize for derailing.

To summarize:

@raytiley and myself are both having this problem still at this time, even though we have followed the most recent fix instructions (https://github.com/ember-cli/ember-cli/issues/3413#issuecomment-77436198 via isaac), it seems due to broccoli and the new glob not playing nice: https://github.com/ember-cli/ember-cli/issues/3413#issuecomment-77468078 via rwjblue .

@raytiley does this sound like a decent summary of where we are so far?

Thanks everyone!

It is not a trivial change (requires setting an option) but glob 4.5.0 now allows you to set { follow: true } to follow all symlinked dirs in ** matches.

@isaacs - Thank you very much! I will begin reviewing and updating all of our dependencies that use rimraf and/or glob to the latest version...

@rwjblue just to confirm (as I'm trying to upgrade now and having the same issues mentioned above) -what deps should I update/add/change to get ember-cli 2.0 beta 1 working?

@toranb "glob": "^4.0.5" should get you going.

@abuiles I currently did glob ^4.0.5 and rimraf 2.3.1 (seems to work currently minus other node-sass issues I'm having)

Like @toranb I had the same problems on a fresh Ember-CLI install today, and was able to get the server working by adding "rimraf":"2.3.1" to the main dependencies in package.json. Glob is at ^4.0.5.

I followed mariozig s suggested steps and got rid of this error. Thanks so much!
โžœ mustache git:(develop) โœ— ember --version
version: 0.2.0-beta.1
node: 0.12.0
npm: 2.1.8

os: Yosemite 10.10.2
1- Updated package.json with:

"dependencies": {
"rimraf": "2.2.8"
},
2- โžœ mustache git:(develop) โœ— rm -rf node_modules tmp dist && npm cache clean

3- โžœ mustache git:(develop) โœ— ember install

Confirmed.
I added "rimraf": "2.2.8" to my depedencies.json
Do an sudo npm install
And then execute in "sudo" mode : sudo ember server

That do the trick for me.

FYI:
ember --version

version: 0.2.0-beta.1
Could not find watchman, falling back to NodeWatcher for file system events
node: 0.10.32
npm: 2.1.8

Thank you all guys!

btw, i just encountered this on 0.2.0-beta.1 as well. updating the glob package in ember-cli to ^4.4.2 did the trick (as suggested in #3426 ).

@leepfrog Thanks, "glob": "^4.4.2" works good for me as well but still need to force "rimraf": "2.3.1" as well.

  "devDependencies": {
    ...
    "glob": "^4.4.2"
  },
  "dependencies": {
    "rimraf": "2.3.1"
  }

This should be resolved with 0.2.0.

I don't think it's resolved... I just struggled with same issue for 3+ hours.. changing Glob 4.05 => 4.4.2 did it for me just now.. and without rimraf; for now

@e-karma - 0.2.0 was released less than 15 minutes ago (right when I commented). Can you try again?

uninstall/reinstall ember-cli @ 0.2.0 w/ same deps?

Confirmed - upgrading a project to ember-cli 0.2.0 has resolved this issue. I removed the rimraf dependency from package.json too.

Also confirmed that creating a fresh project doesn't encounter this issue either.

However, ember serve throws this warning:

The package `ember-data` is not a properly formatted package, we have used a fallback lookup to resolve it at `/Users/adamsrog/Workspace/rog/test-app/node_modules/ember-data`. This is generally caused by an addon not having a `main` entry point (or `index.js`).

Thanks @rwjblue (and everyone else involved)!

+1 @adamsrog. Confirmed that upgrading to ember-cli 0.2.0 has resolved this issue but also getting the ember-data warning. Thanks!

but also getting the ember-data warning. Thanks!

ya that's expected, we will support this until 0.3.x at which time we will stop supporting it, but we will make sure ember-data is updated accordingly.

I've tried upgrading to ember-cli 0.2.0 , Glob 4.4.2, and both versions of rimraf 2.2.8 and 2.3.1. I still get this error that the temp file exists.

@Danfitek - You should use [email protected] and [email protected], those are both specified by ember-cli in 0.2.0, but if you have added them manually to your project you will need to use these versions.

@Danfitek, [email protected], [email protected] and [email protected]. Also try removing glob and rimraf from your package.json.

@rwjblue and @lolmaus Thanks but I still can't get it working. I've tried specifying those versions of glob and rimraf in my package.json and also leaving them out of it. I've uninstalled them and reinstalled them. I'll keep trying.

@Danfitek, are you restarting your Ember CLI dev server?

Hi guys. I followed the full set of steps for upgrading ember-cli version (uninstall, clear caches, install, init...) https://github.com/ember-cli/ember-cli/releases and also restarted my machine. I also installed Watchman. It works perfectly now. It could have been any one of those steps. Thanks.

If you encounter this issue with ember-cli-rails check Multiple (web server) workers cause multiple build servers and race conditions

In my cas I was using ember-cli-coffeescript and after update the was app.js and router.js that were created. If you use ember-cli-coffeescript chek and delete app.js and router.js if you have the .coffee versions

@sulphur I'm running into this issue and I think it has to do with ember-cli-coffeescript...

Error: EEXIST, file already exists '/Users/eric/Projects/myapp/overlord/build/client-web/tmp/coffee_script_filter-output_path-XZuGEV4i.tmp/client-web/routes/application.js'

myapp/routes/application.js does not exists only myapp/routes/application.coffee

any ideas?

maybe try to remove your tmp dir etc.

I also ran into this error while using ember-cli-coffeescript and trying to add ember-simple-auth. The solution was to convert my routes/application.coffee back to JavaScript. For some reason the default application route in ember-simple-auth conflicts with the one written in CoffeeScript.

I encountered the same error when I put the file name in gulp.dest()

gulp.task('compass', function() {
    gulp.src(sassSources)
        .pipe(compass({
            ...
        })
        .pipe(gulp.dest( outputDir + 'css/style.css'))
        .pipe(connect.reload())
});

Removing style.css from gulp.dest( outputDir + 'css/style.css') fixed it for me. Not sure if rimraf has anything to do with this.

I also ran into this error while using ember-cli-coffeescript and trying to add ember-simple-auth. The solution was to convert my routes/application.coffee back to JavaScript. For some reason the default application route in ember-simple-auth conflicts with the one written in CoffeeScript.

This issue still exists 3 years later, wonder why no one has patched it yet

I stumbled on the same error while doing some project restructuring and in my case it was caused by moving component files out of the /app/components and /app/templates/components directories and into the pods structure without changing the file names to component.js and template.hbs respectively.

For example, create a directory /app/pods/components/my-component and move or create the files my-component.js and my-component.hbs and you will see the error thrown on build.

It took a minute to realize the oversight so hopefully this might save others some time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

musaffa picture musaffa  ยท  51Comments

ssured picture ssured  ยท  47Comments

dgavey picture dgavey  ยท  40Comments

GavinJoyce picture GavinJoyce  ยท  31Comments

stefanpenner picture stefanpenner  ยท  66Comments