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

Updating to CLI 0.2.5 causes error with app.js #80

Closed igorsantos07 closed 9 years ago

igorsantos07 commented 9 years ago

Things were working fine on 0.2.3, but then I upgraded ember-cli and:

$ ember build
version: 0.2.5
Building.

=======================================================
Linting completed on 23 files with  0  errors.
=======================================================

Build failed.
EEXIST: file already exists, symlink '/home/igoru/dev/js/protoboard/app/app.js' -> '/home/igoru/dev/js/protoboard/tmp/coffee_script_filter-tmp_dest_dir-oy7V5pwO.tmp/protoboard/app.js'
Error: EEXIST: file already exists, symlink '/home/igoru/dev/js/protoboard/app/app.js' -> '/home/igoru/dev/js/protoboard/tmp/coffee_script_filter-tmp_dest_dir-oy7V5pwO.tmp/protoboard/app.js'
  at Error (native)
  at Object.fs.symlinkSync (fs.js:897:18)
  at symlink (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/symlink-or-copy/index.js:82:14)
  at symlinkOrCopySync (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/symlink-or-copy/index.js:58:5)
  at /home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/index.js:45:11
  at /home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/promise-map-series/index.js:11:14
  at lib$rsvp$$internal$$tryCatch (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:489:16)
  at lib$rsvp$$internal$$invokeCallback (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:501:17)
  at lib$rsvp$$internal$$publish (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:472:11)
  at lib$rsvp$asap$$flush (/home/igoru/dev/js/protoboard/node_modules/ember-cli-coffeescript/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:1290:9)
  at process._tickCallback (node.js:340:13)

Maybe this is related to #78?

igorsantos07 commented 9 years ago

After downgrading to 0.2.3 the issue started to happen as well :( Erasing tmp/ would not help in any of the two versions. I've tried it on 0.2.5 with addon version 0.10 and 0.11, and on 0.2.3, on 0.11.

kimroen commented 9 years ago

Yes, it does look like this is the issue #78 is meant to help with.

Can you make sure you don't have both app.js and app.coffee in your project? The same thing goes for 'router.js`.

igorsantos07 commented 9 years ago

Whaaaaaaaaaaaaat

I got what happened. During update to 0.2.5 the CLI asked to recreate a bunch of files through ember init. That recreated the app.js file instead of updating the coffeescript one. That's the problem. Same for the router.

kimroen commented 9 years ago

Indeed! It's a bit unfortunate.

Hopefully you got everything working - I'll close this.

igorsantos07 commented 9 years ago

Actually, is there any chance the addon could stop the ember init from creating JS files and instead, created CoffeeScript ones? This seems to be a recurring issue during updates.

kimroen commented 9 years ago

Kind of, but not really. It's very related to https://github.com/kimroen/ember-cli-coffeescript/issues/65 - check it out and let me know!