{"action":"created","issue":{"url":"https://api.github.com/repos/shama/gaze/issues/162","labels_url":"https://api.github.com/repos/shama/gaze/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/shama/gaze/issues/162/comments","events_url":"https://api.github.com/repos/shama/gaze/issues/162/events","html_url":"https://github.com/shama/gaze/issues/162","id":49790505,"number":162,"title":"Random ENOENT errors","user":{"login":"oscarotero","id":377873,"avatar_url":"https://avatars.githubusercontent.com/u/377873?v=3","gravatar_id":"","url":"https://api.github.com/users/oscarotero","html_url":"https://github.com/oscarotero","followers_url":"https://api.github.com/users/oscarotero/followers","following_url":"https://api.github.com/users/oscarotero/following{/other_user}","gists_url":"https://api.github.com/users/oscarotero/gists{/gist_id}","starred_url":"https://api.github.com/users/oscarotero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oscarotero/subscriptions","organizations_url":"https://api.github.com/users/oscarotero/orgs","repos_url":"https://api.github.com/users/oscarotero/repos","events_url":"https://api.github.com/users/oscarotero/events{/privacy}","received_events_url":"https://api.github.com/users/oscarotero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-11-22T13:31:15Z","updated_at":"2015-01-21T17:27:44Z","closed_at":null,"body":"Hi, I found old issues about this problem but I cannot solve this problem in my case.\r\nThe error I get is:\r\n```\r\nfs.js:690\r\n  return binding.lstat(pathModule._makeLong(path));\r\n                 ^\r\nError: ENOENT, no such file or directory '/Users/oscarotero/www/folk/public/css/.subl141.tmp'\r\n    at Object.fs.lstatSync (fs.js:690:18)\r\n    at /Users/oscarotero/www/stylecow/stylecow-cli/node_modules/gaze/lib/gaze.js:270:21\r\n    at iterate (/Users/oscarotero/www/stylecow/stylecow-cli/node_modules/gaze/lib/helper.js:106:5)\r\n    at Object.forEachSeries (/Users/oscarotero/www/stylecow/stylecow-cli/node_modules/gaze/lib/helper.js:121:3)\r\n    at /Users/oscarotero/www/stylecow/stylecow-cli/node_modules/gaze/lib/gaze.js:267:12\r\n    at ReaddirReq.Req.done (/Users/oscarotero/www/stylecow/stylecow-cli/node_modules/gaze/node_modules/graceful-fs/graceful-fs.js:143:5)\r\n    at ReaddirReq.done (/Users/oscarotero/www/stylecow/stylecow-cli/node_modules/gaze/node_modules/graceful-fs/graceful-fs.js:90:22)\r\n    at Object.oncomplete (fs.js:107:15)\r\n```\r\n\r\nI don't know whether this is due a gaze issue or a wrong implementation by me. What I do is some similar to the following:\r\n\r\n```js\r\nvar gaze = require('gaze');\r\nvar files = css.getImportedFiles(); //returns an array of filenames\r\n\r\ngaze(files, function (err, watcher) {\r\n    watcher.on('changed', function (filepath) {\r\n        console.log('changed detected: ' + filepath);\r\n\r\n        css.update(); //update the css with the new code\r\n\r\n        //adds new @import files dinamically\r\n        css.getImportedFiles().forEach(function (file) {\r\n            if (files.indexOf(file) === -1) {\r\n                files.push(file);\r\n                watcher.add([file]);\r\n            }\r\n        });\r\n    });\r\n});\r\n```\r\n\r\nAs you can see in the error message, gaze detects changes in files with names like `.subl141.tmp`. I'm using sublimeText to edit the css files so I guess these files are temporary files used by sublime to save the changes, that gaze detects before they are removed.\r\n\r\nI'm using gaze 0.6.4 that it's the latest version, released 6 months ago. I can see there are 27 commits since then, maybe this issue is fixed and it's time for a new release.\r\n\r\nThanks so much for this great library"},"comment":{"url":"https://api.github.com/repos/shama/gaze/issues/comments/70881600","html_url":"https://github.com/shama/gaze/issues/162#issuecomment-70881600","issue_url":"https://api.github.com/repos/shama/gaze/issues/162","id":70881600,"user":{"login":"psi-4ward","id":1191572,"avatar_url":"https://avatars.githubusercontent.com/u/1191572?v=3","gravatar_id":"","url":"https://api.github.com/users/psi-4ward","html_url":"https://github.com/psi-4ward","followers_url":"https://api.github.com/users/psi-4ward/followers","following_url":"https://api.github.com/users/psi-4ward/following{/other_user}","gists_url":"https://api.github.com/users/psi-4ward/gists{/gist_id}","starred_url":"https://api.github.com/users/psi-4ward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psi-4ward/subscriptions","organizations_url":"https://api.github.com/users/psi-4ward/orgs","repos_url":"https://api.github.com/users/psi-4ward/repos","events_url":"https://api.github.com/users/psi-4ward/events{/privacy}","received_events_url":"https://api.github.com/users/psi-4ward/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T17:27:44Z","updated_at":"2015-01-21T17:27:44Z","body":"doesnt work \r\nbut using navelgazer directly ill receive change events for every action\r\n\r\nbtw. you sould reference `navelgazer` package in the package.json\r\n\r\n"}}