ember-cli: Error: ENOENT, when deleting empty folder which used to contain a file

An error occurs when I delete an empty folder when a file used to be in it. This does not crash ember-cli, just displays an error.

I am on version 2.2.0-beta.2. Below is the console output from running ember s.

  1. Create File
file added templates/untitled file

Build successful - 219ms.
  1. Create folder
file added templates/untitled folder

Build successful - 211ms.
  1. Move file into folder
file deleted templates/untitled file
file added templates/untitled folder/untitled file

Build successful - 242ms.    
  1. Move file out of folder
file deleted templates/untitled folder/untitled file
file added templates/untitled file

Build successful - 237ms.
  1. Delete now empty folder
file deleted templates/untitled folder
ENOENT: no such file or directory, rmdir '/Users/michael/Sites/super-rentals/tmp/template_compiler-output_path-nC2C6Cdc.tmp/super-rentals/templates/untitled folder'
Error: ENOENT: no such file or directory, rmdir '/Users/michael/Sites/super-rentals/tmp/template_compiler-output_path-nC2C6Cdc.tmp/super-rentals/templates/untitled folder'
    at Error (native)
    at Object.fs.rmdirSync (fs.js:806:18)
    at TemplateCompiler.<anonymous> (/Users/michael/Sites/super-rentals/node_modules/ember-cli-htmlbars/node_modules/broccoli-persistent-filter/index.js:83:32)
    at /Users/michael/Sites/super-rentals/node_modules/ember-cli-htmlbars/node_modules/broccoli-persistent-filter/node_modules/promise-map-series/index.js:11:14
    at lib$rsvp$$internal$$tryCatch (/Users/michael/Sites/super-rentals/node_modules/ember-cli-htmlbars/node_modules/broccoli-persistent-filter/node_modules/rsvp/dist/rsvp.js:493:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/michael/Sites/super-rentals/node_modules/ember-cli-htmlbars/node_modules/broccoli-persistent-filter/node_modules/rsvp/dist/rsvp.js:505:17)
    at /Users/michael/Sites/super-rentals/node_modules/ember-cli-htmlbars/node_modules/broccoli-persistent-filter/node_modules/rsvp/dist/rsvp.js:1001:13
    at lib$rsvp$asap$$flush (/Users/michael/Sites/super-rentals/node_modules/ember-cli-htmlbars/node_modules/broccoli-persistent-filter/node_modules/rsvp/dist/rsvp.js:1198:9)
    at nextTickCallbackWith0Args (node.js:433:9)
    at process._tickCallback (node.js:362:13)

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 16 (15 by maintainers)

Commits related to this issue

Most upvoted comments

@mozeryansky if you have a moment it would be helpful to check whether #5965 fixes this problem in your app. It looks very likely to.