{"action":"created","issue":{"url":"https://api.github.com/repos/felixge/node-require-all/issues/39","repository_url":"https://api.github.com/repos/felixge/node-require-all","labels_url":"https://api.github.com/repos/felixge/node-require-all/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/felixge/node-require-all/issues/39/comments","events_url":"https://api.github.com/repos/felixge/node-require-all/issues/39/events","html_url":"https://github.com/felixge/node-require-all/issues/39","id":190045505,"number":39,"title":"Certain files won't get required","user":{"login":"Redsandro","id":1702193,"avatar_url":"https://avatars.githubusercontent.com/u/1702193?v=3","gravatar_id":"","url":"https://api.github.com/users/Redsandro","html_url":"https://github.com/Redsandro","followers_url":"https://api.github.com/users/Redsandro/followers","following_url":"https://api.github.com/users/Redsandro/following{/other_user}","gists_url":"https://api.github.com/users/Redsandro/gists{/gist_id}","starred_url":"https://api.github.com/users/Redsandro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Redsandro/subscriptions","organizations_url":"https://api.github.com/users/Redsandro/orgs","repos_url":"https://api.github.com/users/Redsandro/repos","events_url":"https://api.github.com/users/Redsandro/events{/privacy}","received_events_url":"https://api.github.com/users/Redsandro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-17T13:22:55Z","updated_at":"2016-11-18T14:30:09Z","closed_at":null,"body":"For some reason, certain files won't get require'd, although those files themselves are legal.\r\n\r\n```\r\nnode@4.2.6\r\nrequire-all@2.0.0\r\n```\r\n\r\nUbuntu 16.04 LTS\r\n\r\nI don't know how to debug this. The required files are not enumerable.\r\n\r\n```\r\n'use strict';\r\n\r\nmodule.exports = require('require-all')({\r\n\tdirname\t\t: __dirname,\r\n\tfilter\t\t: /^(?!index).+\\.js$/,\r\n\tmap(name, path) {\r\n\t\tconsole.log(path, name);\r\n\t}\r\n});\r\n\r\n// Expected to list all included files, but only runs once\r\nfor (let idx = 0, keys = Object.keys(module.exports), len = keys.length; idx < len; idx++) {\r\n\tlet key = keys[idx];\r\n\tconsole.log('GOT MODULE:', key);\t// undefined\r\n}\r\n```\r\n\r\nThe directory contains the following files:\r\n\r\n* `getRequestType.js` works\r\n* `getRequestLocations.js` does not work, returns `undefined`\r\n* `getRequestSearches.js` works\r\n* `getFakeQuotes.js` does not work, returns `undefined`\r\n\r\nThe scripts are big, and something causes `require-all` to skip them.\r\n\r\nAssuming a normal `require` is used internally, the source shouldn't even matter.\r\n\r\n__Note__ that all files work fine when importing manually. No errors.\r\n__Note__ that everything works fine using [`require-dir-all`](https://www.npmjs.com/package/require-dir-all).\r\n__Workaround:__ Use `require-dir-all`\r\n"},"comment":{"url":"https://api.github.com/repos/felixge/node-require-all/issues/comments/261544686","html_url":"https://github.com/felixge/node-require-all/issues/39#issuecomment-261544686","issue_url":"https://api.github.com/repos/felixge/node-require-all/issues/39","id":261544686,"user":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T14:30:09Z","updated_at":"2016-11-18T14:30:09Z","body":"Your regular expression has no capture group. Either your regular expression needs a capture group to get the name from or your map function needs to return a name. If neither do, then the module has no idea what property name to load your file under."}}
{"actor":{"display_login":"dougwilson"}}