kimroen / ember-cli-coffeescript

Adds precompilation of CoffeeScript files and all the basic generation types to the ember generate command.
MIT License
72 stars 49 forks source link

Error: EEXIST, file already exists #71

Closed Truffula closed 9 years ago

Truffula commented 9 years ago

I'm using ember-cli-coffeescript in a project that has a combination of .coffee and .js files (which may or not be relevant), and whenever I edit one of the coffee files, it creates a matching .js file in the same folder, which then breaks the build:

EEXIST, file already exists '/Users/work/htdocs/onboard/client/tmp/coffee_script_filter-tmp_dest_dir-Y7vlbjlp.tmp/my-awesome-app/path/to/file.js'

Using the following versions:

ember-cli: 0.2.0-beta.1,
ember-cli-coffeescript: 0.10.0
kimroen commented 9 years ago

Hi there, Christopher.

I'm not sure what you particular problem is here, but some thoughts:

tolgaek commented 9 years ago

Having the same issue with this library. And yes @kimroen, it was because during the ember reset process, ember-cli creates a few of the js files. The ones I came across were router.coffee which was duplicated with a router.js. I also use emblem and ember-cli added an application.hbs, when I had application.emblem

@Truffula deleting router.js should resolve your issue

kimroen commented 9 years ago

Thanks @tolgaek. Hopefully that solves your problem, @Truffula.

I'd really like to overwrite the app-blueprint so that when you do ember init you get coffee-files, but we've discussed this in #65. The currently proposed solution there won't help with this. I just can't keep a blueprint with all the files in the app-blueprint up to date.

Maybe if I could "extend" the blueprint and only overwrite the files that are different?

A different approach could be to detect this and show a more informative error message if you have these duplicates.

Thoughts?

kimroen commented 9 years ago

We'll try to find a solution for this, but I'll close in favor of #65.

Truffula commented 9 years ago

Thanks, and sorry for the delay in replying! It was ... an out-of-date package, I think? (Sorry, became a dad recently so I'm a little sleep-deprived!)

kimroen commented 9 years ago

@Truffula Congratulations!

michaeldeitcher commented 8 years ago

I'm running into a similar issue after upgrading Ember Simple Auth.

I have a /routes/application.coffee then I install Ember Simple Auth then I get the this error: EEXIST, file already exists '/Users/michaeldeitcher/Workspace/trekaroo_js/tmp/coffee_script_filter-output_path-9vXQqp8u.tmp/trekaroo-js/routes/application.js'

If I delete this file the issue goes away: /Users/michaeldeitcher/Workspace/trekaroo_js/node_modules/ember-simple-auth/app/routes/application.js

#65 Does not address this problem with addon compatibility. Please help.

kimroen commented 8 years ago

@michaeldeitcher Sorry that you're running in to this. You're right that there is an issue, but it's more related to #87. In there, you'll find that the temporary solution to this is actually to use javascript for your application route.

There is a lot more description of the issue and potential solutions over there, and I'd love any and all help if you have resources to spare.

michaeldeitcher commented 8 years ago

Thanks for your response @kimroen. I ended up converting the file to js and it's working fine. I'll take a look at #87

hoIIer commented 8 years ago

+1 I just ran into this same issue... kind of annoying to have to use js for certain files as it defeats the purpose of using coffeescript! is this something that is an issue with ember-simple-auth and needs to be addressed or a larger issue with addons?