{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/32700","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/32700/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/32700/comments","events_url":"https://api.github.com/repos/rails/rails/issues/32700/events","html_url":"https://github.com/rails/rails/issues/32700","id":316905927,"node_id":"MDU6SXNzdWUzMTY5MDU5Mjc=","number":32700,"title":"lot of 'is already being watched through' messages when using rails console if using node_modules","user":{"login":"vmarquet","id":6226610,"node_id":"MDQ6VXNlcjYyMjY2MTA=","avatar_url":"https://avatars3.githubusercontent.com/u/6226610?v=4","gravatar_id":"","url":"https://api.github.com/users/vmarquet","html_url":"https://github.com/vmarquet","followers_url":"https://api.github.com/users/vmarquet/followers","following_url":"https://api.github.com/users/vmarquet/following{/other_user}","gists_url":"https://api.github.com/users/vmarquet/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarquet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarquet/subscriptions","organizations_url":"https://api.github.com/users/vmarquet/orgs","repos_url":"https://api.github.com/users/vmarquet/repos","events_url":"https://api.github.com/users/vmarquet/events{/privacy}","received_events_url":"https://api.github.com/users/vmarquet/received_events","type":"User","site_admin":false},"labels":[{"id":107195,"node_id":"MDU6TGFiZWwxMDcxOTU=","url":"https://api.github.com/repos/rails/rails/labels/railties","name":"railties","color":"8BE06E","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2018-04-23T17:21:54Z","updated_at":"2018-10-09T06:50:41Z","closed_at":null,"author_association":"NONE","body":"(This is not strictly a bug but more of a medium annoyance.)\r\n\r\n### Steps to reproduce\r\n\r\n* create a rails project\r\n* install some particular npm packages at the root of the rails app: `npm install puppeteer`\r\n* stopping spring ensures the messages appear: `spring stop`\r\n* try logging into the console: `rails c`\r\n\r\n### Expected behavior\r\n\r\nI expect to be elegantly logged into the Rails console:\r\n\r\n```\r\n$ rails c\r\nRunning via Spring preloader in process 45930\r\nLoading development environment (Rails 5.1.4)\r\n>\r\n```\r\n\r\n### Actual behavior\r\n\r\nSometimes, I get a lot of error messages: \r\n\r\n```\r\n$ rails c\r\n        ** ERROR: directory is already being watched! **\r\n\r\n        Directory: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/Current\r\n\r\n        is already being watched through: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A\r\n\r\n        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors\r\n        ** ERROR: directory is already being watched! **\r\n\r\n        Directory: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A/Helpers\r\n\r\n        is already being watched through: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A/Helpers\r\n\r\n        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors\r\n        ** ERROR: directory is already being watched! **\r\n\r\n        Directory: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A/Internet Plug-Ins\r\n\r\n        is already being watched through: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A/Internet Plug-Ins\r\n\r\n        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors\r\n        ** ERROR: directory is already being watched! **\r\n\r\n        Directory: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A/Libraries\r\n\r\n        is already being watched through: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A/Libraries\r\n\r\n        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors\r\n        ** ERROR: directory is already being watched! **\r\n\r\n        Directory: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A/Resources\r\n\r\n        is already being watched through: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A/Resources\r\n\r\n        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors\r\n        ** ERROR: directory is already being watched! **\r\n\r\n        Directory: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A/XPCServices\r\n\r\n        is already being watched through: /Users/vincent/Projets/myapp/node_modules/puppeteer/.local-chromium/mac-549031/chrome-mac/Chromium.app/Contents/Versions/67.0.3391.0/Chromium Framework.framework/Versions/A/XPCServices\r\n\r\n        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors\r\nRunning via Spring preloader in process 45579\r\nLoading development environment (Rails 5.1.4)\r\n>\r\n```\r\n\r\n### System configuration\r\n\r\n* Rails 5.1.4\r\n* Ruby 2.4.2p198\r\n\r\n### Additional information\r\n\r\nI looked at the Guard wiki, but that didn't really help me to solve the problem. I couldn't find how to configure Guard/Listen to ignore the `node_modules` directory.\r\n\r\nIs there a way to not watch that directory and thus prevent error messages from cluttering the Rails console? Or maybe those message could simply be filtered and not sent to the user terminal."},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/428080130","html_url":"https://github.com/rails/rails/issues/32700#issuecomment-428080130","issue_url":"https://api.github.com/repos/rails/rails/issues/32700","id":428080130,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODA4MDEzMA==","user":{"login":"rjurado01","id":1703608,"node_id":"MDQ6VXNlcjE3MDM2MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1703608?v=4","gravatar_id":"","url":"https://api.github.com/users/rjurado01","html_url":"https://github.com/rjurado01","followers_url":"https://api.github.com/users/rjurado01/followers","following_url":"https://api.github.com/users/rjurado01/following{/other_user}","gists_url":"https://api.github.com/users/rjurado01/gists{/gist_id}","starred_url":"https://api.github.com/users/rjurado01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjurado01/subscriptions","organizations_url":"https://api.github.com/users/rjurado01/orgs","repos_url":"https://api.github.com/users/rjurado01/repos","events_url":"https://api.github.com/users/rjurado01/events{/privacy}","received_events_url":"https://api.github.com/users/rjurado01/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T06:50:41Z","updated_at":"2018-10-09T06:50:41Z","author_association":"NONE","body":"@mysticaltech Yes, the bug is that for a reason that I don't know `dtw` variable includes the root directory and it should not do it. For provisional fix, what I do is remove this before calling `filter_out_descendants`. \r\n\r\nFor best aproach I suggest to see the code of @y-yagi: https://github.com/rails/rails/pull/33822/files\r\n\r\n"}}
{"actor":{"display_login":"rjurado01"}}