{"action":"opened","issue":{"url":"https://api.github.com/repos/nodeschool/discussions/issues/1862","repository_url":"https://api.github.com/repos/nodeschool/discussions","labels_url":"https://api.github.com/repos/nodeschool/discussions/issues/1862/labels{/name}","comments_url":"https://api.github.com/repos/nodeschool/discussions/issues/1862/comments","events_url":"https://api.github.com/repos/nodeschool/discussions/issues/1862/events","html_url":"https://github.com/nodeschool/discussions/issues/1862","id":173932255,"number":1862,"title":"Module exercise","user":{"login":"samd21313","id":7294355,"avatar_url":"https://avatars.githubusercontent.com/u/7294355?v=3","gravatar_id":"","url":"https://api.github.com/users/samd21313","html_url":"https://github.com/samd21313","followers_url":"https://api.github.com/users/samd21313/followers","following_url":"https://api.github.com/users/samd21313/following{/other_user}","gists_url":"https://api.github.com/users/samd21313/gists{/gist_id}","starred_url":"https://api.github.com/users/samd21313/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samd21313/subscriptions","organizations_url":"https://api.github.com/users/samd21313/orgs","repos_url":"https://api.github.com/users/samd21313/repos","events_url":"https://api.github.com/users/samd21313/events{/privacy}","received_events_url":"https://api.github.com/users/samd21313/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-30T05:22:30Z","updated_at":"2016-08-30T05:22:30Z","closed_at":null,"body":"I cant figure out what im doing wrong \r\n* node version: <6.5.0>\r\n* npm version:  <3.10.6> \r\n```  ✗  Your additional module file [filtered-module.js] returned an error on\r\n  its callback: { Error: ENOENT: no such file or directory, scandir\r\n  'C:\\node\\younode\\verify' at Error (native) errno: -4058, code: 'ENOENT',\r\n  syscall: 'scandir', path: 'C:\\node\\younode\\verify' }\r\n```\r\n\r\nModule File\r\n```js \r\n module.exports = function(directory,fileType,callback){\r\n\r\nvar fs = require('fs');\r\nvar path = require('path');\r\n\r\nvar directory = process.argv[2];\r\nvar fileType = '.'+ process.argv[3];\r\n\r\nfs.readdir(directory, function (err, list){\r\n  if (err) {return callback(err)}\r\n    for(i=0;i<list.length;i++){\r\n        if (path.extname(list[i]) === fileType){\r\n            console.log(list[i]);}\r\n        }\r\n    });\r\n\r\n}\r\n\r\n```\r\nProgram file\r\n```\r\nvar filter = require('./filtered-module');\r\n\r\nfilter(process.argv[2],process.argv[3])\r\n\r\n```"}}
{"actor":{"display_login":"samd21313"}}