Error: unable to resolve root /Users/me/path/project/app: directory /Users/me/path/project/app is not watched
at null.<anonymous> (/Users/me/path/project/node_modules/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/node_modules/fb-watchman/index.js:84:23)
the particular path changes and has included
@calvinmetcalf steps to reproduce please
I'm seeing similar error:
[ilkkao:~/git/mas/client]$ ember build --watch (master✱)
version: 0.1.4
valid watchman found, version: [3.0.0]
Building..events.js:85
throw er; // Unhandled 'error' event
^
Error: unable to resolve root /Users/ilkkao/git/mas/client/config: directory /Users/ilkkao/git/mas/client/config is not watched
at null.<anonymous> (/Users/ilkkao/git/mas/client/node_modules/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/node_modules/fb-watchman/index.js:84:23)
at emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:162:16)
at Readable.push (_stream_readable.js:125:10)
at Transform.push (_stream_transform.js:140:32)
at JSONStream._transform (/Users/ilkkao/git/mas/client/node_modules/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/node_modules/fb-watchman/node_modules/json-stream/lib/json-stream.js:30:14)
at Transform._read (_stream_transform.js:179:10)
at Transform._write (_stream_transform.js:167:12)
at doWrite (_stream_writable.js:265:12)
at writeOrBuffer (_stream_writable.js:252:5)
I'll check tomorrow if my project causes ember build --watch to fail also on my second laptop.
what does watchman watch-list yield
{
"version": "3.0.0",
"roots": [
"/Users/ilkkao/tmp/mas/mas/config",
"/Users/ilkkao/tmp/mas/mas/bower_components/ember-qunit/dist/named-amd",
"/Users/ilkkao/tmp/mas/mas/bower_components/handlebars",
"/Users/ilkkao/tmp/mas/mas/bower_components/ember-resolver/dist/modules",
"/Users/ilkkao/git/mas/client/tests",
"/Users/ilkkao/tmp/mas/mas/bower_components/qunit/qunit",
"/Users/ilkkao/tmp/mas/mas/bower_components/ember",
"/Users/ilkkao/tmp/mas/mas/bower_components/jquery/dist",
"/Users/ilkkao/tmp/mas/mas/bower_components/loader.js",
"/Users/ilkkao/tmp/mas/mas/bower_components/ember-qunit-notifications",
"/Users/ilkkao/tmp/mas/mas/bower_components/ember-cli-shims",
"/Users/ilkkao/git/mas/client/app",
"/Users/ilkkao/tmp/mas/mas/public",
"/Users/ilkkao/tmp/mas/mas/tests",
"/Users/ilkkao/tmp/mas/mas/bower_components/qunit-notifications",
"/Users/ilkkao/tmp/mas/mas/bower_components/ember-load-initializers",
"/Users/ilkkao/tmp/mas/mas/app",
"/Users/ilkkao/tmp/mas/mas/bower_components/ember-data"
]
}
client/config is indeed missing from the list. Can I debug this deeper? I'm very new to ember-cli.
Watchman output for the same project on my other laptop:
{
"version": "3.0.0",
"roots": [
"/Users/ilkkao/git/mas/client/bower_components/lodash/dist",
"/Users/ilkkao/git/mas/client/bower_components/Caret.js/dist",
"/Users/ilkkao/git/mas/client/bower_components/bootstrap-contextmenu",
"/Users/ilkkao/git/mas/client/bower_components/handlebars",
"/Users/ilkkao/git/mas/client/bower_components/ember-qunit/dist/named-amd",
"/Users/ilkkao/git/mas/client/bower_components/bootstrap/dist/js",
"/Users/ilkkao/git/mas/client/bower_components/jquery.atwho/dist/js",
"/Users/ilkkao/git/mas/client/public",
"/Users/ilkkao/git/mas/client/bower_components/bootstrap/dist/fonts",
"/Users/ilkkao/git/mas/client/bower_components/jquery/dist",
"/Users/ilkkao/git/mas/client/bower_components/ember-load-initializers",
"/Users/ilkkao/git/mas/client/bower_components/howler",
"/Users/ilkkao/git/mas/client/bower_components/emojify.js",
"/Users/ilkkao/git/mas/client/bower_components/velocity",
"/Users/ilkkao/git/mas/client/config",
"/Users/ilkkao/git/mas/client/bower_components/ember",
"/Users/ilkkao/git/mas/client/bower_components/ember-resolver/dist/modules",
"/Users/ilkkao/git/mas/client/bower_components/qunit-notifications",
"/Users/ilkkao/git/mas/client/bower_components/emojify.js/images",
"/Users/ilkkao/git/mas/client/bower_components/ember-cli-shims",
"/Users/ilkkao/git/mas/client/bower_components/uri.js/src",
"/Users/ilkkao/git/mas/client/bower_components/jquery-cookie",
"/Users/ilkkao/git/mas/client/bower_components",
"/Users/ilkkao/git/mas/client/app",
"/Users/ilkkao/git/mas/client/bower_components/qunit/qunit",
"/Users/ilkkao/git/mas/client/bower_components/momentjs",
"/Users/ilkkao/git/mas/client/bower_components/magnific-popup/dist",
"/Users/ilkkao/git/mas/client/tests",
"/Users/ilkkao/git/mas/client/bower_components/loader.js",
"/Users/ilkkao/git/mas/client/bower_components/ember-qunit-notifications",
"/Users/ilkkao/git/mas/client/bower_components/font-awesome/fonts",
"/Users/ilkkao/git/mas/client/bower_components/TitleNotifier.js",
"/Users/ilkkao/git/mas/client/bower_components/FileAPI/dist"
]
}
That looks much more normal. In my first example ember-cli has started to use my ~/tmp directory. I checked that those subdirectories actually exist there. Maybe I did something wrong at some point.
i have this problem too
events.js:72
throw er; // Unhandled 'error' event
^
Error: FSEventStreamStart failed
at [object Object].
at [object Object].emit (events.js:95:17)
at [object Object].
at [object Object].emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:426:10)
at emitReadable (_stream_readable.js:422:5)
node v0.10.32
npm 2.1.9
watchman 3.0.0"
OS X 10.10.1
@AmilKey what is the result of watchman watch-list
@stefanpenner
{
"version": "3.0.0",
"roots": [
"/Users/user/projects/proj/bower_components/ember-validations",
"/Users/user/projects/proj/bower_components/simpleStorage",
"/Users/user/projects/proj/bower_components/ember-localstorage-adapter",
"/Users/user/projects/proj/bower_components/bootstrap-stylus/js",
"/Users/user/projects/proj/bower_components/sinon",
"/Users/user/projects/proj/public",
"/Users/user/projects/proj/bower_components/jquery-mockjax",
"/Users/user/projects/proj/bower_components/webshim",
"/Users/user/projects/proj/app",
"/Users/user/projects/proj/bower_components/ember-utils/dist/globals",
"/Users/user/projects/proj/bower_components/group-helper",
"/Users/user/projects/proj/tests",
"/Users/user/projects/proj/bower_components/bootstrap-stylus",
"/Users/user/projects/proj/bower_components/webshim/js-webshim/dev",
"/Users/user/projects/proj/bower_components/CryptoJS/build/components",
"/Users/user/projects/proj/bower_components/ember-responsive/dist",
"/Users/user/projects/proj/bower_components/typehead.js/dist",
"/Users/user/projects/proj/bower_components/jqueryui-touch-punch",
"/Users/user/projects/proj/config",
"/Users/user/projects/proj/bower_components/numeral",
"/Users/user/projects/proj/bower_components/jquery-ui",
"/Users/user/projects/proj/bower_components/ember-i18n/lib"
]
}
@stefanpenner i resolve this error
after reboot system this error disappeared
MacBook-Pro-Ivan:proj.net user$ ember s
version: 0.1.4
valid watchman found, version: [3.0.0]
Livereload server on port 35729
Serving on http://0.0.0.0:4200/
Build successful - 14005ms.
Slowest Trees | Total
-------------------------------+----------------
EsnextFilter | 6340ms
EsnextFilter | 1994ms
StylusCompiler | 1578ms
ES6Concatenator | 942ms
CoffeeScriptFilter | 857ms
file added main.js
file added bower.json
file added ember-renderspeed.js
file added LICENSE
@AmilKey @calvinmetcalf which commands were you running when you hit this?
@stefanpenner after reboot system
watchman watch-list
{
"version": "3.0.0",
"roots": [
"/Users/user/projects/proj/bower_components/jquery/dist",
"/Users/user/projects/proj/bower_components/loader.js",
"/Users/user/projects/proj/bower_components/ember-cli-shims",
"/Users/user/projects/proj/bower_components/qunit/qunit",
"/Users/user/projects/proj/bower_components/cldr",
"/Users/user/projects/proj/bower_components/ember-localstorage-adapter",
"/Users/user/projects/proj/bower_components/simpleStorage",
"/Users/user/projects/proj/bower_components/ember-validations",
"/Users/user/projects/proj/bower_components/ember",
"/Users/user/projects/proj/bower_components/sinon",
"/Users/user/projects/proj/bower_components/bootstrap-stylus/js",
"/Users/user/projects/proj/bower_components/ember-load-initializers",
"/Users/user/projects/proj/bower_components/ember-data",
"/Users/user/projects/proj/bower_components/moment",
"/Users/user/projects/proj/bower_components/ember-renderspeed",
"/Users/user/projects/proj/app",
"/Users/user/projects/proj/bower_components/webshim",
"/Users/user/projects/proj/bower_components/jquery-mockjax",
"/Users/user/projects/proj/public",
"/Users/user/projects/proj/bower_components/handlebars",
"/Users/user/projects/proj/bower_components/ember-qunit-notifications",
"/Users/user/projects/proj/bower_components/bootstrap-stylus",
"/Users/user/projects/proj/tests",
"/Users/user/projects/proj/bower_components/group-helper",
"/Users/user/projects/proj/bower_components/ember-utils/dist/globals",
"/Users/user/projects/proj/bower_components/ember-resolver/dist/modules",
"/Users/user/projects/proj/bower_components/ember-qunit/dist/named-amd",
"/Users/user/projects/proj/config",
"/Users/user/projects/proj/bower_components/jqueryui-touch-punch",
"/Users/user/projects/proj/bower_components/typehead.js/dist",
"/Users/user/projects/proj/bower_components/ember-responsive/dist",
"/Users/user/projects/proj/bower_components/CryptoJS/build/components",
"/Users/user/projects/proj/bower_components/webshim/js-webshim/dev",
"/Users/user/projects/proj/bower_components/qunit-notifications",
"/Users/user/projects/proj/bower_components/jquery-ui",
"/Users/user/projects/proj/bower_components/numeral",
"/Users/user/projects/proj/bower_components/ember-easyForm",
"/Users/user/projects/proj/bower_components/ember-i18n/lib"
]
}
@stefanpenner i deleted
"ember-cli-dependency-checker" from package.json
after
npm i
bower i
and
"ember s" and seen this error
The watch roots seem low enough in count that it isn't a problem. But clearly with watchman we can just watch bower_components and be done with it. Or maybe even the top level root
Might be annoying to refactor but worth it regardless if it is this problem or not
Reboot fixed also my problems
@wez any thoughts? Doesn't seem like we are blowing any obvious limt, atleast not on our end.
Anything relevant in the watchman log file? you can find it at $TMPDIR/.watchman.$USER.log
@wez good to know. Thanks
I couldn't find .watchman log from any obvious location (/tmp, /var/tmp, or project-root/tmp) but the fallback watcher also dies and gives EMFILE error in this situation
If I do sudo lsof | cut -f1 -d " " | sort | uniq -c | sort -n I can see that Chrome has a lot of descriptors open:
181 Sublime
201 UserEvent
267 Dock
387 com.apple
482 Spotify
3111 Google
My easiest work-a-round now is to restart Chrome. Maybe there's nothing wrong in ember-cli and wathcman. Error message is just cryptic. I'm still puzzled why I hit the limit as sysctl -w kern.maxfiles returns kern.maxfiles: 12288 (and sysctl -w kern.maxfilesperproc is kern.maxfilesperproc: 10240)
I'm probably seeing: https://code.google.com/p/chromium/issues/detail?id=418752
I'm having this same issue when trying to include watchman with the latest Ember CLI 0.1.5 trying to
app.import('bower_components/moment/moment.js');
Same issue as everyone else when trying to add imports in my brocfile.
Restart of device fixed it as well. (OSX10.10.1)
Running watchman shutdown-server and restarting ember server solved this for me.
Had this problem after installing ember-cli-pretender and bower_components/FakeXMLHttpRequest was not watched.
as watchman doesn't age-out watched roots, they can pile up and need cleaning. https://github.com/ember-cli/ember-cli/issues/2894 is a short term workaround.
Currently ember-cli is to conservative with assigning roots, we need to be more aggressive when watchman is present. This should cut down on watched roots.
I've got this for the second time after running a custom component generator.
Even the #2894 workaround doesn't work for me: https://gist.github.com/leobalter/a6c07307301a021a9c25
Edit: updating ember-cli from 1.5 to 1.7 worked. I'll install another component to give a feedback if this issue seems completely fixed.
Restarting Chrome fixed it for me.
Closing Sublime fixed the error for me. There is another issue mentioning this as well (sorry I can't find the issue)
Before closing Sublime and doing watchman watch-list showed the below
{
"version": "3.0.0",
"roots": [
"/Users/petermumford/code/web/geojobs/client/public",
"/Users/petermumford/code/web/geojobs/client/app",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-data",
"/Users/petermumford/code/web/geojobs/client/vendor",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-cli-shims",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-load-initializers",
"/Users/petermumford/code/web/geojobs/client/bower_components/qunit/qunit",
"/Users/petermumford/code/web/geojobs/client/bower_components/qunit-notifications",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-qunit/dist/named-amd",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-qunit-notifications",
"/Users/petermumford/code/web/geojobs/client/tests",
"/Users/petermumford/code/web/geojobs/client/config"
]
}
and after restarting showed:
{
"version": "3.0.0",
"roots": [
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-resolver/dist/modules",
"/Users/petermumford/code/web/geojobs/client/public",
"/Users/petermumford/code/web/geojobs/client/app",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-data",
"/Users/petermumford/code/web/geojobs/client/bower_components/loader.js",
"/Users/petermumford/code/web/geojobs/client/vendor",
"/Users/petermumford/code/web/geojobs/client/bower_components/jquery/dist",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-cli-shims",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-load-initializers",
"/Users/petermumford/code/web/geojobs/client/bower_components/qunit/qunit",
"/Users/petermumford/code/web/geojobs/client/bower_components/qunit-notifications",
"/Users/petermumford/code/web/geojobs/client/bower_components/typeahead.js/dist",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-qunit/dist/named-amd",
"/Users/petermumford/code/web/geojobs/client/bower_components/ember-qunit-notifications",
"/Users/petermumford/code/web/geojobs/client/tests",
"/Users/petermumford/code/web/geojobs/client/bower_components/handlebars",
"/Users/petermumford/code/web/geojobs/client/config"
]
}
@wez any thoughts?
Closing Sublime and Chrome to resolve things makes this not sound like a watchman issue.
I still don't see any watchman logs referenced here, so it's hard to say for sure.
@wez I don't use sublime but I will try it out and try and give you and the authors of sublime feedback
The fact that chrome matters leads me to believe the system is starved on free fd. Like will be improved once we use watchman correctly. I intend to do this still just haven't had a chance yet
@wez I've tried to get my watchman logs for you but when I run this command $TMPDIR/.watchman.$USER.log I get the following error: The file /var/folders/t6/fgpx3xp567xbvpzmjhj5bxrr0000gn/T//.watchman.petermumford.log does not exist.
Is there something I've missed when installing/starting watchman? I have watchman version 3.0.0.
FWIW, just ran into the same issue on a new project. Ember CLI 0.1.9
Closing Sublime resolved this for me.
Would also like to report that closing Sublime Text 3 b3069 resolved this issue for me on ember-cli 0.1.14.
I also got similar errors until I closed Sublime Text 3.
Our integration with watchman is currently suboptimal. We watch way more roots then we need to when watchman is enabled. in addition, watchman doesn't age out watchers. Ultimately though if we stop watching nearly as many roots as we are, the problem is mostly mitigated.
Stefan, something I noticed is that the code automatically adds directories (and subdirectories!) of files specified in app.import(...), which to me is a problem for several reasons:
path/to/dist. I am running into an issue where I want to watch another directory for changes to set off the build system for SUI, but because I have to use app.import('path/to//dist/outputfile.ext'), it results in dist and all of the subdirs under dist getting watched. However, the actual files that I _need_ watched are not. (I have not figured out how to add them to the watcher yet, so if you have any suggestions, please advise.Also, I have noticed ember-app.js uses unwatchedTree. As a workaround to 1. I would like to use this, but have no clue where it should be used or how. Any help is extremely welcome.
@Panoplos ya you nailed it, basically our watcher interactions + user facing API are mis-aligned.
Sublime:
⌘+Q
Terminal:
subl .
ember s
So not using sublime is the solution???
I tried using mac built in texteditor... ember serve stopped working after a while with that to.
watchman "version": "3.1.1"
ember-cli 0.2.3
node: 0.12.2
npm: 2.7.6
ember: 1.10.1 and latest same error
running
sudo pkill -9 -x fseventsd
watchman shutdown-server
lets me work again for 2-3 changes then it crash again.
Yeap! :(
@morgondag
Same here, with:
watchman: 3.2
npm: 1.4.3
node: 0.10.26
ember-cli: 0.2.5
ember: 1.11.3
watching integration is now much better, haven't seen this when using watchman 3.7 or later.
@stefanpenner Just started using ember, getting startd with the quickstart tutorial. Two steps in, in the define a route step, I ran into this same problem (and I am using watchman version 4.40).
When I tried to visit the template page, nothing would show, and terminal logged the following error:
unable to resolve root /Users/acastano/Sites/Projects/studbits: failed to opendir(/Users/acastano/Sites/Projects/studbits): No such file or directory
Error: unable to resolve root /Users/acastano/Sites/Projects/studbits: failed to opendir(/Users/acastano/Sites/Projects/studbits): No such file or directory
at BunserBuf.<anonymous> (/Users/acastano/Sites/projects/studbits/node_modules/ember-cli/node_modules/sane/node_modules/fb-watchman/index.js:95:23)
at emitOne (events.js:96:13)
at BunserBuf.emit (events.js:188:7)
at BunserBuf.process (/Users/acastano/Sites/projects/studbits/node_modules/ember-cli/node_modules/sane/node_modules/fb-watchman/node_modules/bser/index.js:289:10)
at /Users/acastano/Sites/projects/studbits/node_modules/ember-cli/node_modules/sane/node_modules/fb-watchman/node_modules/bser/index.js:244:12
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
I was able to get the page to render by running ember build and then ember serve. But I still see the error displayed.
But (unless I did something wrong) if the error isn't fixed, the documentation should be updated with ways to resolve error so as to not discourage beginners 2 steps into the tutorial.
@alidcastano We've not seen this issue in a long time so can you open a new issue and include your environmental information?
Alternatively, since it's likely something unique about your machine please stop by #-ember-cli in the Ember Community Slack and see if anybody in our community can help you solve this problem.