Skip to content

Error: EEXIST, file already exists #3413

Closed

Description

@fivetwentysix
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

Activity

  1. btecu commented on Mar 4, 2015

    @btecu
    Contributor

    Any of you using outputPaths?

    #3365

  2. wstrinz commented on Mar 4, 2015

    @wstrinz

    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.

  3. mariozig commented on Mar 4, 2015

    @mariozig

    @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.

  4. btecu commented on Mar 4, 2015

    @btecu
    Contributor

    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...

  5. bobbyhubbard commented on Mar 4, 2015

    @bobbyhubbard
  6. mariozig commented on Mar 4, 2015

    @mariozig

    @bobbyhubbard are you sure it's the same bug? nodejs/node-v0.x-archive#8651 says it was fixed in node: 0.12.0 and i'm definitely seeing it with that version.

  7. stickbyatlas commented on Mar 4, 2015

    @stickbyatlas

    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.)

  8. fivetwentysix commented on Mar 4, 2015

    @fivetwentysix
    Author

    This is why npm needs something similar to gemfile.lock

  9. stickbyatlas commented on Mar 4, 2015

    @stickbyatlas

    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.

  10. dopin commented on Mar 4, 2015

    @dopin

    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.

  11. JohnRodney commented on Mar 4, 2015

    @JohnRodney

    @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.

  12. fotinakis commented on Mar 4, 2015

    @fotinakis
    Contributor

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

  13. 131 remaining items

  14. erichaus commented on Mar 13, 2016

    @erichaus

    @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?

  15. sulphur commented on Mar 13, 2016

    @sulphur

    maybe try to remove your tmp dir etc.

  16. andrewhavens commented on Apr 13, 2016

    @andrewhavens

    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.

  17. rebase-master commented on Feb 1, 2017

    @rebase-master

    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.

  18. simonlennon-advanced commented on Aug 16, 2020

    @simonlennon-advanced

    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

  19. zofskeez commented on Sep 4, 2020

    @zofskeez

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions