question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Race condition prevents cleaning of dist folder between rebuilds

See original GitHub issue

The first time I run a fastboot on a simple project, it works. Second time it crashes:

➜  moment-fastboot-example git:(master) NODE_DEBUG=fs ember fastboot --serve-assets
Installing FastBoot npm dependencies

Build successful - 12390ms.

Slowest Trees                                 | Total               
----------------------------------------------+---------------------
Babel                                         | 4257ms              
Babel                                         | 2892ms              
Babel                                         | 689ms               

Slowest Trees (cumulative)                    | Total (avg)         
----------------------------------------------+---------------------
Babel (30)                                    | 9917ms (330 ms)     

DEBUG: -------------------------------
DEBUG: Ember      : 2.7.0
DEBUG: Ember Data : 2.7.0
DEBUG: -------------------------------
Ember FastBoot running at http://[::]:3000
^C%                                                                                                                                                                                                                                                                          ➜  moment-fastboot-example git:(master) NODE_DEBUG=fs ember fastboot --serve-assets
Installing FastBoot npm dependencies

Build successful - 2498ms.

Slowest Trees                                 | Total               
----------------------------------------------+---------------------
SourceMapConcat: Concat: Vendor /assets/ve... | 135ms               

Slowest Trees (cumulative)                    | Total (avg)         
----------------------------------------------+---------------------
Babel (30)                                    | 678ms (22 ms)       
SourceMapConcat: Concat: Vendor /asset... (2) | 257ms (128 ms)      
JSHint templates (2)                          | 155ms (77 ms)       

fs.js:88
        throw backtrace;
        ^

Error: ENOTEMPTY: directory not empty, rmdir '/Users/gandalf/hacking/fastboot/moment-fastboot-example/dist/node_modules/moment/src/'
    at rethrow (fs.js:83:21)
    at maybeCallback (fs.js:101:42)
    at Object.fs.rmdir (fs.js:871:14)
    at TreeSync.<anonymous> (/Users/gandalf/hacking/fastboot/moment-fastboot-example/node_modules/tree-sync/index.js:79:19)
    at Array.forEach (native)
    at TreeSync.sync (/Users/gandalf/hacking/fastboot/moment-fastboot-example/node_modules/tree-sync/index.js:50:14)
    at CoreObject.module.exports.Task.extend.copyToOutputPath (/Users/gandalf/hacking/fastboot/moment-fastboot-example/node_modules/ember-cli/lib/models/builder.js:173:10)
    at /Users/gandalf/hacking/fastboot/moment-fastboot-example/node_modules/ember-cli/lib/models/builder.js:187:21
    at lib$rsvp$$internal$$tryCatch (/Users/gandalf/hacking/fastboot/moment-fastboot-example/node_modules/rsvp/dist/rsvp.js:493:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/gandalf/hacking/fastboot/moment-fastboot-example/node_modules/rsvp/dist/rsvp.js:505:17)

Repository that I used to test: https://github.com/gandalfar/moment-fastboot-example

➜  moment-fastboot-example git:(master) ember -v
ember-cli: 2.7.0
node: 6.2.1
os: darwin x64

Connected ticket with a bit more discussion: https://github.com/jasonmit/ember-cli-moment-shim/issues/55

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:13
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
kratiahujacommented, Mar 7, 2017

This should be solved by #356 . We should close this once that lands.

2reactions
jurecuhalevcommented, Aug 3, 2016

Running ember s also fixes fastboot. So that it runs once correctly again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

unify ember fastboot --watch + ember server · Issue #274 · ember ...
continue to benefit from existing broccoli middleware features (serving the error ... Race condition prevents cleaning of dist folder between rebuilds #246.
Read more >
How can I prevent race conditions in make? - Stack Overflow
Another reason related to what I just said is when I need to build from a different directory. I use make -C some/path/to/dir...
Read more >
Solving common problems - Gradle User Manual
Developers can always re-run the build with clean , and "fix" their builds ... Moreover, race conditions between different builds trying to store...
Read more >
Bug#536967: phyml: FTBFS: No targets specified and no makefile ...
During a rebuild of all packages in sid, your package failed to build on ... Isn't it a race condition in which your...
Read more >
PyInstaller Documentation - Read the Docs
Your bundled application should now be available in the dist folder. ... file permissions prevent shared libraries or executables from being tampered with....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found