{"action":"created","issue":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/1023","repository_url":"https://api.github.com/repos/facebookincubator/create-react-app","labels_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/1023/labels{/name}","comments_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/1023/comments","events_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/1023/events","html_url":"https://github.com/facebookincubator/create-react-app/issues/1023","id":188152524,"number":1023,"title":"npm run build fails for EventEmitter","user":{"login":"godmar","id":486389,"avatar_url":"https://avatars.githubusercontent.com/u/486389?v=3","gravatar_id":"","url":"https://api.github.com/users/godmar","html_url":"https://github.com/godmar","followers_url":"https://api.github.com/users/godmar/followers","following_url":"https://api.github.com/users/godmar/following{/other_user}","gists_url":"https://api.github.com/users/godmar/gists{/gist_id}","starred_url":"https://api.github.com/users/godmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godmar/subscriptions","organizations_url":"https://api.github.com/users/godmar/orgs","repos_url":"https://api.github.com/users/godmar/repos","events_url":"https://api.github.com/users/godmar/events{/privacy}","received_events_url":"https://api.github.com/users/godmar/received_events","type":"User","site_admin":false},"labels":[{"id":409578974,"url":"https://api.github.com/repos/facebookincubator/create-react-app/labels/bug","name":"bug","color":"ee0701","default":true},{"id":409578977,"url":"https://api.github.com/repos/facebookincubator/create-react-app/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true},{"id":413042976,"url":"https://api.github.com/repos/facebookincubator/create-react-app/labels/underlying%20tools","name":"underlying tools","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2016-11-09T02:07:49Z","updated_at":"2016-11-19T15:33:03Z","closed_at":null,"body":"@gaearon asked that I file a separate issue.\r\n\r\nHow to reproduce: run `create-react-app fail-event-emitter`, add a line\r\n```\r\nimport EventEmitter from 'events';\r\n``` \r\nto `src/index.js` and then run `npm run build`, which fails with:\r\n\r\n```\r\n> fail-event-emitter@0.1.0 build /home/gback/fail-event-emitter\r\n> react-scripts build\r\n\r\nCreating an optimized production build...\r\nFailed to compile.\r\n\r\nstatic/js/main.068c41be.js from UglifyJs\r\nUnexpected character '`' [/usr/lib/nodejs/events.js:260,0]\r\n```\r\n\r\nreact-scripts 0.7.0 is used and node.js 6.9.1 (or 7.0)\r\n\r\nThe purported cause is that CRA does not transpile \"dependencies\" into ES5 and then the UglifyJS plugin fails when it encounters ES6 code.\r\nThe test case above was derived from a failure in react-bootstrap-tables, which includes a module that in turn references EventEmitter. Others have suggested to provide an alternate EventEmitter implementation in the application path, but it is not clear to me how react-bootstrap-table's dependencies can be made to use this alternate implementation.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/comments/261720593","html_url":"https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-261720593","issue_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/1023","id":261720593,"user":{"login":"godmar","id":486389,"avatar_url":"https://avatars.githubusercontent.com/u/486389?v=3","gravatar_id":"","url":"https://api.github.com/users/godmar","html_url":"https://github.com/godmar","followers_url":"https://api.github.com/users/godmar/followers","following_url":"https://api.github.com/users/godmar/following{/other_user}","gists_url":"https://api.github.com/users/godmar/gists{/gist_id}","starred_url":"https://api.github.com/users/godmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godmar/subscriptions","organizations_url":"https://api.github.com/users/godmar/orgs","repos_url":"https://api.github.com/users/godmar/repos","events_url":"https://api.github.com/users/godmar/events{/privacy}","received_events_url":"https://api.github.com/users/godmar/received_events","type":"User","site_admin":false},"created_at":"2016-11-19T15:33:03Z","updated_at":"2016-11-19T15:33:03Z","body":"BTW, @henri-hulski node 5.12.0 was released [2016-06-23](https://nodejs.org/en/download/releases/) so that's consistent with my statement since the commit is from Jan 2016."}}
{"actor":{"display_login":"godmar"}}