Server requires restart after deleting component (or route)


#1

When I delete a route or component (and possibly other objects, but those two for sure) and the server is running, the automatic recompile fails and there is no way to recover except stopping the server and restarting it.

EPERM: operation not permitted, lstat 'D:\Sandbox\imwebnext\app\pods\components\rom-form\rom-movement\component.js’ Error: EPERM: operation not permitted, lstat ‘D:\Sandbox\imwebnext\app\pods\components\rom-form\rom-movement\component.js’

I tested this on another Windows 10 machine and it does the same thing. It’s very time consuming to keep having to restart the server every time I delete something. Does anyone have a clue why this is happening?

Thank you.


#2

No idea, but if it offers a slight bit of comfort, I can tell you that I develop on Windows 10, delete (and rename) routes and components all the time, and the server keeps on chugging away. Occasionally it will catch things just right and think there is a build error, but it rights itself without my intervention.

I’m not at my development machine at the moment. I wonder if there is a way to compare our environment?


#3

Everything used to work perfect for me, but something changed and I have no idea where to look. Today, I created a brand new ember project, using the latest CLI, Node, etc Running on Windows 10 latest as well. Did “Ember serve” and the welcome page shows up.

  • ember new myapp, then cd’d into myapp
  • ember serve
  • ember g route xyz - application updated itself and the welcome page stayed up
  • ember d route xyz - deleted some files, then got the “Dang” page.

NOTE: I tried this in my Windows Ubuntu environment and it exhibited the same behavior. (See 2nd output). ALSO, I tried this on a completely different Windows machine and got the exact same behavior. These machines are pretty vanilla - no significant background apps running, no antivirus except for Windows Defender. This is cray-cray.


D:\Sandbox\myapp>ember serve

Running without permission to symlink will degrade build performance.
See http://ember-cli.com/user-guide/#windows for details.

Livereload server on http://localhost:49153
'instrument' is imported from external module 'ember-data/-debug' but never used

Build successful (9904ms) – Serving on http://localhost:4200/

Slowest Nodes (totalTime => 5% )              | Total (avg)
----------------------------------------------+---------------------
Babel (16)                                    | 5438ms (339 ms)
Concat (8)                                    | 2492ms (311 ms)

file added routes\xyz.js
file added templates\xyz.hbs
file changed router.js
file added unit\routes
file added unit\routes\xyz-test.js

Build successful (492ms) – Serving on http://localhost:4200/



Slowest Nodes (totalTime => 5% )              | Total (avg)
----------------------------------------------+---------------------
broccoli-persistent-filter:EslintValid... (2) | 48ms (24 ms)
broccoli-persistent-filter:Babel > [Ba... (3) | 47ms (15 ms)
BroccoliMergeTrees (6)                        | 39ms (6 ms)
TreeMerger (appAndDependencies) (2)           | 28ms (14 ms)
SourceMapConcat: Concat: App (1)              | 25ms

file deleted routes\xyz.js
file deleted templates\xyz.hbs
file changed router.js
file deleted unit\routes\xyz-test.js
file deleted unit\routes
The Broccoli Plugin: [SimpleConcatConcat] failed with:
Error: ENOENT: no such file or directory, lstat 'D:\Sandbox\myapp\tmp\broccoli_persistent_filtereslint_validation_filter-input_base_path-R2dY0Sgs.tmp\routes\xyz.js'
    at Error (native)
    at Object.fs.lstatSync (fs.js:995:11)
    at EslintValidationFilter.Filter.isDirectory (D:\Sandbox\myapp\node_modules\broccoli-persistent-filter\index.js:270:23)
    at EslintValidationFilter.Filter.getDestFilePath (D:\Sandbox\myapp\node_modules\broccoli-persistent-filter\index.js:275:12)
    at EslintValidationFilter.getDestFilePath (D:\Sandbox\myapp\node_modules\broccoli-lint-eslint\lib\index.js:125:55)
    at D:\Sandbox\myapp\node_modules\broccoli-persistent-filter\index.js:154:52
    at D:\Sandbox\myapp\node_modules\promise-map-series\index.js:11:14
    at tryCatch (D:\Sandbox\myapp\node_modules\rsvp\dist\rsvp.js:525:12)
    at invokeCallback (D:\Sandbox\myapp\node_modules\rsvp\dist\rsvp.js:538:13)
    at D:\Sandbox\myapp\node_modules\rsvp\dist\rsvp.js:606:14

The broccoli plugin was instantiated at:
    at Concat.Plugin (D:\Sandbox\myapp\node_modules\broccoli-plugin\index.js:7:31)
    at new Concat (D:\Sandbox\myapp\node_modules\broccoli-concat\concat.js:38:10)
    at module.exports (D:\Sandbox\myapp\node_modules\broccoli-concat\index.js:26:10)
    at Function.EslintValidationFilter.create (D:\Sandbox\myapp\node_modules\broccoli-lint-eslint\lib\index.js:217:10)
    at Class.lintTree (D:\Sandbox\myapp\node_modules\ember-cli-eslint\index.js:44:19)
    at output.project.addons.reduce (D:\Sandbox\myapp\node_modules\ember-cli\lib\broccoli\ember-app.js:653:25)
    at Array.reduce (native)
    at EmberApp.addonLintTree (D:\Sandbox\myapp\node_modules\ember-cli\lib\broccoli\ember-app.js:651:38)
    at EmberApp.lintTestTrees (D:\Sandbox\myapp\node_modules\ember-cli\lib\broccoli\ember-app.js:1209:26)
    at EmberApp.appTests (D:\Sandbox\myapp\node_modules\ember-cli\lib\broccoli\ember-app.js:1180:28)

OUTPUT FROM UBUNTU ENVIRONMENT (added and removed route aaa):

file deleted templates/aaa.hbs
file added templates
file added templates/application.hbs
file added templates/components
file added routes
file changed router.js
file deleted unit/routes/aaa-test.js
file deleted unit/routes
file added unit
The Broccoli Plugin: [SimpleConcatConcat] failed with:
Error: ENOENT: no such file or directory, lstat '/mnt/d/Sandbox/myapp2/tmp/broccoli_persistent_filtereslint_validation_filter-input_base_path-bgr5jvOk.tmp/routes/aaa.js'
    at Error (native)
    at Object.fs.lstatSync (fs.js:995:11)
    at EslintValidationFilter.Filter.isDirectory (/mnt/d/Sandbox/myapp2/node_modules/broccoli-persistent-filter/index.js:270:23)
    at EslintValidationFilter.Filter.getDestFilePath (/mnt/d/Sandbox/myapp2/node_modules/broccoli-persistent-filter/index.js:275:12)
    at EslintValidationFilter.getDestFilePath (/mnt/d/Sandbox/myapp2/node_modules/broccoli-lint-eslint/lib/index.js:125:55)
    at /mnt/d/Sandbox/myapp2/node_modules/broccoli-persistent-filter/index.js:154:52
    at /mnt/d/Sandbox/myapp2/node_modules/promise-map-series/index.js:11:14
    at tryCatch (/mnt/d/Sandbox/myapp2/node_modules/rsvp/dist/rsvp.js:525:12)
    at invokeCallback (/mnt/d/Sandbox/myapp2/node_modules/rsvp/dist/rsvp.js:538:13)
    at /mnt/d/Sandbox/myapp2/node_modules/rsvp/dist/rsvp.js:606:14

The broccoli plugin was instantiated at:
    at Concat.Plugin (/mnt/d/Sandbox/myapp2/node_modules/broccoli-plugin/index.js:7:31)
    at new Concat (/mnt/d/Sandbox/myapp2/node_modules/broccoli-concat/concat.js:38:10)
    at module.exports (/mnt/d/Sandbox/myapp2/node_modules/broccoli-concat/index.js:26:10)
    at Function.EslintValidationFilter.create (/mnt/d/Sandbox/myapp2/node_modules/broccoli-lint-eslint/lib/index.js:217:10)
    at Class.lintTree (/mnt/d/Sandbox/myapp2/node_modules/ember-cli-eslint/index.js:44:19)
    at output.project.addons.reduce (/mnt/d/Sandbox/myapp2/node_modules/ember-cli/lib/broccoli/ember-app.js:653:25)
    at Array.reduce (native)
    at EmberApp.addonLintTree (/mnt/d/Sandbox/myapp2/node_modules/ember-cli/lib/broccoli/ember-app.js:651:38)
    at EmberApp.lintTestTrees (/mnt/d/Sandbox/myapp2/node_modules/ember-cli/lib/broccoli/ember-app.js:1209:26)
    at EmberApp.appTests (/mnt/d/Sandbox/myapp2/node_modules/ember-cli/lib/broccoli/ember-app.js:1180:28)```

#4

Yeah this happens to me all the time on OSX. I usually just save/touch some file to trigger a rebuild or I restart the server. Big pain but I never felt like investing the time to try and fix it.


#5

That is exactly why I’ve been putting up with it for so long - didn’t want to start troubleshooting because I have so much work to do, but it is really starting to drag me down, especially during initial prototyping when I create something, then figure out a better way to do it. I’ve been “batching” destroys. I hope someone has a fix for this.


#6

Just wanted to throw in a +1. This happens to me all the time too, but since restarting the server solves the issue every time, I never invested time to try to fix it.

Also, may be useful to note that I develop on Windows and use a ramdisk for my tmp directory, so I was never quite sure if the issue was due to my unconventional development environment or not.


#7

I also turned off real-time AV scanning of my dev folder and build times when from ~5min to about 30sec. (Ember Server to page load). Builds from file change detection are almost instant after turning it off. Not an answer to your question, but perhaps uselful to others.


#8

Anyone from Ember have any insight into this problem?


#9

What is realtime AV scanning? Where can I read about it?


#10

Anti-virus protection. “Real-time” in the sense that is scans files as they are opened/saved. It’s a real killer in the node folder.


#11

Not a Windows user. But on OSX, I have a similar problem (Error: ENOENT). I just touch a random file instead of restarting and so far it worked fine.

I don’t remember where I read that before but encrypted filesystem make things a bit slow wrt Ember development on OSX. I have been wondering all the time if it is true and this very problem is due to that.