{"action":"created","issue":{"url":"https://api.github.com/repos/projectkudu/kudu/issues/1930","repository_url":"https://api.github.com/repos/projectkudu/kudu","labels_url":"https://api.github.com/repos/projectkudu/kudu/issues/1930/labels{/name}","comments_url":"https://api.github.com/repos/projectkudu/kudu/issues/1930/comments","events_url":"https://api.github.com/repos/projectkudu/kudu/issues/1930/events","html_url":"https://github.com/projectkudu/kudu/issues/1930","id":141169404,"number":1930,"title":"Gulp fails on deploying.","user":{"login":"Dia6lo","id":8434406,"avatar_url":"https://avatars.githubusercontent.com/u/8434406?v=3","gravatar_id":"","url":"https://api.github.com/users/Dia6lo","html_url":"https://github.com/Dia6lo","followers_url":"https://api.github.com/users/Dia6lo/followers","following_url":"https://api.github.com/users/Dia6lo/following{/other_user}","gists_url":"https://api.github.com/users/Dia6lo/gists{/gist_id}","starred_url":"https://api.github.com/users/Dia6lo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dia6lo/subscriptions","organizations_url":"https://api.github.com/users/Dia6lo/orgs","repos_url":"https://api.github.com/users/Dia6lo/repos","events_url":"https://api.github.com/users/Dia6lo/events{/privacy}","received_events_url":"https://api.github.com/users/Dia6lo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-03-16T04:24:26Z","updated_at":"2016-03-24T06:50:02Z","closed_at":null,"body":"I'm trying to deploy my gulp application on Azure and I'm getting\r\n`Error: ENOTSUP: operation not supported on socket, scandir 'D:\\home\\site\\wwwroot\\src\\assets\\images\\back.png'`\r\nwhen my deployment script goes to this part:\r\n```\r\n:: 5. Run gulp transformations\r\nIF EXIST \"%DEPLOYMENT_TARGET%\\gulpfile.js\" (\r\n  pushd \"%DEPLOYMENT_TARGET%\"\r\n  echo Running gulp serve.\r\n  call :ExecuteCmd gulp serve\r\n  IF !ERRORLEVEL! NEQ 0 goto error\r\n  popd\r\n)\r\n```"},"comment":{"url":"https://api.github.com/repos/projectkudu/kudu/issues/comments/200697928","html_url":"https://github.com/projectkudu/kudu/issues/1930#issuecomment-200697928","issue_url":"https://api.github.com/repos/projectkudu/kudu/issues/1930","id":200697928,"user":{"login":"suwatch","id":1088218,"avatar_url":"https://avatars.githubusercontent.com/u/1088218?v=3","gravatar_id":"","url":"https://api.github.com/users/suwatch","html_url":"https://github.com/suwatch","followers_url":"https://api.github.com/users/suwatch/followers","following_url":"https://api.github.com/users/suwatch/following{/other_user}","gists_url":"https://api.github.com/users/suwatch/gists{/gist_id}","starred_url":"https://api.github.com/users/suwatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suwatch/subscriptions","organizations_url":"https://api.github.com/users/suwatch/orgs","repos_url":"https://api.github.com/users/suwatch/repos","events_url":"https://api.github.com/users/suwatch/events{/privacy}","received_events_url":"https://api.github.com/users/suwatch/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T06:50:01Z","updated_at":"2016-03-24T06:50:01Z","body":"The issue is in glob.js (`d:\\home\\site\\wwwroot\\node_modules\\globule\\node_modules\\glob\\glob.js`).\r\n\r\nWhen running `gulp watch`, it iterates and calls `fs.readdirSync`on all files/folders.   It relies on `ENOTDIR` error code to detect if it is file (not a directory).   However, on Windows, if files is on network share, the error will be `ENOTSUP` instead.   glob.js needs to anticipate for that.    The issue also described [here](https://github.com/isaacs/node-glob/issues/205).\r\n\r\nThe simple fix is to add `case \"ENOTSUP\":` to `d:\\home\\site\\wwwroot\\node_modules\\globule\\node_modules\\glob\\glob.js` line 608.   See below.\r\n\r\n```javascript\r\n  // now handle errors, and cache the information\r\n  if (er) switch (er.code) {\r\n    case \"ENOTDIR\": // totally normal. means it *does* exist.\r\n    case \"ENOTSUP\": // same as ENOTDIR if network drive\r\n      this.statCache[f] = 1\r\n      return cb.call(this, er)\r\n    case \"ENOENT\": // not terribly unusual\r\n```   \r\n\r\n  "}}