{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/7384","repository_url":"https://api.github.com/repos/meteor/meteor","labels_url":"https://api.github.com/repos/meteor/meteor/issues/7384/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/7384/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/7384/events","html_url":"https://github.com/meteor/meteor/issues/7384","id":164809181,"number":7384,"title":"Uncaught TypeError: fs.readFileSync is not a function","user":{"login":"kachkaev","id":608862,"avatar_url":"https://avatars.githubusercontent.com/u/608862?v=3","gravatar_id":"","url":"https://api.github.com/users/kachkaev","html_url":"https://github.com/kachkaev","followers_url":"https://api.github.com/users/kachkaev/followers","following_url":"https://api.github.com/users/kachkaev/following{/other_user}","gists_url":"https://api.github.com/users/kachkaev/gists{/gist_id}","starred_url":"https://api.github.com/users/kachkaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kachkaev/subscriptions","organizations_url":"https://api.github.com/users/kachkaev/orgs","repos_url":"https://api.github.com/users/kachkaev/repos","events_url":"https://api.github.com/users/kachkaev/events{/privacy}","received_events_url":"https://api.github.com/users/kachkaev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-11T10:46:14Z","updated_at":"2016-07-12T16:14:34Z","closed_at":null,"body":"​I'm trying to use `meteor npm install `[`react-map-gl`](https://github.com/uber/react-map-gl) and end up with this fatal error in a browser:\r\n```txt\r\nsvg.react.js:61 Uncaught TypeError: fs.readFileSync is not a function\r\n```\r\n\r\n![capture](https://cloud.githubusercontent.com/assets/608862/16728158/b0a9801c-475c-11e6-8a3b-3629b00c6b57.PNG)\r\n\r\nMy guess is that the issue is somehow related to the way meteor mocks nodes's `fs` methods. I've added [`meteor-node-stubs`](https://github.com/meteor/node-stubs) to my local `node_modules`, but this did not help.\r\n\r\nI understand that using `fs.readFileSync` on a client is odd, but assume that there is a reason for referencing this method. It does not seem to cause problems in apps that are built not with meteor, so I guess we should not move the issue upstream.\r\n\r\nTrying everything on Meteor 1.4-beta.9. Any ideas on a temporal workaround?"},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/232097836","html_url":"https://github.com/meteor/meteor/issues/7384#issuecomment-232097836","issue_url":"https://api.github.com/repos/meteor/meteor/issues/7384","id":232097836,"user":{"login":"kachkaev","id":608862,"avatar_url":"https://avatars.githubusercontent.com/u/608862?v=3","gravatar_id":"","url":"https://api.github.com/users/kachkaev","html_url":"https://github.com/kachkaev","followers_url":"https://api.github.com/users/kachkaev/followers","following_url":"https://api.github.com/users/kachkaev/following{/other_user}","gists_url":"https://api.github.com/users/kachkaev/gists{/gist_id}","starred_url":"https://api.github.com/users/kachkaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kachkaev/subscriptions","organizations_url":"https://api.github.com/users/kachkaev/orgs","repos_url":"https://api.github.com/users/kachkaev/repos","events_url":"https://api.github.com/users/kachkaev/events{/privacy}","received_events_url":"https://api.github.com/users/kachkaev/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T16:14:34Z","updated_at":"2016-07-12T16:14:34Z","body":"It appears that the issue I'm facing is sourcing from this file:  [mapbox-gl-shaders/index.js](https://github.com/mapbox/mapbox-gl-shaders/blob/57576d602b2239fa4854f69f2edc72b1267c3e1a/index.js). It is expected to be processed by webpack and turned into a single file where occurances of `fs.readFileSync` are replaced with the actual content of the files.\r\n\r\nMeteor does not seem to be able to process such a thing. Any ways to overcome the problem with the current build system?\r\n\r\nI could have tried to just use a dist version of `mapbox-gl-js`, but only if there was no react wrapper. Uber's `react-map-gl` sets `mapbox-gl-js`as a dependency and imports various sub-dependencies in its code using `import`/`require`."}}
{"actor":{"display_login":"kachkaev"}}