{"action":"created","issue":{"url":"https://api.github.com/repos/substack/brfs/issues/39","labels_url":"https://api.github.com/repos/substack/brfs/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/substack/brfs/issues/39/comments","events_url":"https://api.github.com/repos/substack/brfs/issues/39/events","html_url":"https://github.com/substack/brfs/issues/39","id":56166452,"number":39,"title":"Error combining with 6to5ify","user":{"login":"akula1001","id":512966,"avatar_url":"https://avatars.githubusercontent.com/u/512966?v=3","gravatar_id":"","url":"https://api.github.com/users/akula1001","html_url":"https://github.com/akula1001","followers_url":"https://api.github.com/users/akula1001/followers","following_url":"https://api.github.com/users/akula1001/following{/other_user}","gists_url":"https://api.github.com/users/akula1001/gists{/gist_id}","starred_url":"https://api.github.com/users/akula1001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akula1001/subscriptions","organizations_url":"https://api.github.com/users/akula1001/orgs","repos_url":"https://api.github.com/users/akula1001/repos","events_url":"https://api.github.com/users/akula1001/events{/privacy}","received_events_url":"https://api.github.com/users/akula1001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-01T15:16:23Z","updated_at":"2015-02-28T01:52:08Z","closed_at":null,"body":"I'm trying to do a brfs transform after 6to5ify, but get the following error.\r\n\r\n```\r\nbrowserify()\r\n    .require(\"main\", { entry: true })\r\n    .transform(6to5ify)\r\n    .transform(brfs)\r\n    .bundle()\r\n    .pipe(fs.createWriteStream(path.join('app.js')));\r\n```\r\n\r\n```\r\nevents.js:72\r\n        throw er; // Unhandled 'error' event\r\n              ^\r\nError: tried to statically call { readFile: [Function: readFile], readFileSync: [Function: readFileSync], readdir: [Function: readdir], readdirSync: [Function: readdirSync] } as a function while parsing file: /Users/akula/foo/main.js while parsing file: /Users/akula/foo/main.js\r\n    at error (/Users/akula/foo/node_modules/brfs/node_modules/static-module/index.js:71:49)\r\n    at traverse (/Users/akula/foo/node_modules/brfs/node_modules/static-module/index.js:247:24)\r\n    at walk (/Users/akula/foo/node_modules/brfs/node_modules/static-module/index.js:216:13)\r\n    at walk (/Users/akula/foo/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:60:9)\r\n    at /Users/akula/foo/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:51:25\r\n    at Array.forEach (native)\r\n    at forEach (/Users/akula/foo/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:8:31)\r\n    at /Users/akula/foo/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:49:17\r\n    at Array.forEach (native)\r\n    at forEach (/Users/akula/foo/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:8:31)\r\n```\r\nbtw, there's a double \"while parsing file\" in the message.\r\n\r\nMy main.js looks like this.\r\n```\r\nimport fs from 'fs';\r\n\r\nvar foo = fs.readFileSync(__dirname + '/foo.html');\r\nconsole.log(foo.toString());\r\n```\r\n\r\nIf I change the import to a require and don't do 6to5ify it works fine, but together it gives the error. "},"comment":{"url":"https://api.github.com/repos/substack/brfs/issues/comments/76503633","html_url":"https://github.com/substack/brfs/issues/39#issuecomment-76503633","issue_url":"https://api.github.com/repos/substack/brfs/issues/39","id":76503633,"user":{"login":"vegetableman","id":1330851,"avatar_url":"https://avatars.githubusercontent.com/u/1330851?v=3","gravatar_id":"","url":"https://api.github.com/users/vegetableman","html_url":"https://github.com/vegetableman","followers_url":"https://api.github.com/users/vegetableman/followers","following_url":"https://api.github.com/users/vegetableman/following{/other_user}","gists_url":"https://api.github.com/users/vegetableman/gists{/gist_id}","starred_url":"https://api.github.com/users/vegetableman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vegetableman/subscriptions","organizations_url":"https://api.github.com/users/vegetableman/orgs","repos_url":"https://api.github.com/users/vegetableman/repos","events_url":"https://api.github.com/users/vegetableman/events{/privacy}","received_events_url":"https://api.github.com/users/vegetableman/received_events","type":"User","site_admin":false},"created_at":"2015-02-28T01:52:08Z","updated_at":"2015-02-28T01:52:08Z","body":"Faced this problem as well."}}