{"action":"created","issue":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/3780","repository_url":"https://api.github.com/repos/gatsbyjs/gatsby","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/3780/labels{/name}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/3780/comments","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/3780/events","html_url":"https://github.com/gatsbyjs/gatsby/issues/3780","id":292894676,"number":3780,"title":"\"gatsby build\" breaks when dependencies use es6 code (which Uglify doesn't support)","user":{"login":"szimek","id":9873,"avatar_url":"https://avatars1.githubusercontent.com/u/9873?v=4","gravatar_id":"","url":"https://api.github.com/users/szimek","html_url":"https://github.com/szimek","followers_url":"https://api.github.com/users/szimek/followers","following_url":"https://api.github.com/users/szimek/following{/other_user}","gists_url":"https://api.github.com/users/szimek/gists{/gist_id}","starred_url":"https://api.github.com/users/szimek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szimek/subscriptions","organizations_url":"https://api.github.com/users/szimek/orgs","repos_url":"https://api.github.com/users/szimek/repos","events_url":"https://api.github.com/users/szimek/events{/privacy}","received_events_url":"https://api.github.com/users/szimek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-01-30T18:45:43Z","updated_at":"2018-02-04T04:35:51Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Description\r\n\r\nAfter upgrading Gatsby to 1.9.167, I'm getting the following error when I try to run `gatsby build`:\r\n```\r\nerror Generating JavaScript bundles failed\r\n\r\n  Error: component---src-templates-post-jsx-dbdaebf346a9292b96a8.js from UglifyJs\r\n  SyntaxError: Unexpected token: name (isLastCharLower) [./~/camelcase/index.js:4,0]\r\n```\r\nThe line mentioned in the error contains keyword `let`. Looks like (at least) dependencies are no longer compiled to ES5 and UglifyJS version used by Gatsby doesn't understand ES6+, so it throws an error.\r\n\r\nThe same app works fine with 1.9.166. It's most likely caused by some changes introduced in https://github.com/gatsbyjs/gatsby/pull/3369, [other changes introduced in this version](https://github.com/gatsbyjs/gatsby/compare/3db23ca744af14a8e3304258ee10cb1e01563193...c9374f01eb518cea2f4ecb6f1d6949c38780cbcf) don't look suspicious.\r\n\r\nTo replicate this issue create a new Gatsby project, run `yarn add camelcase`, import and call `camelcase` in any component and run `gatsby build`."},"comment":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments/362880275","html_url":"https://github.com/gatsbyjs/gatsby/issues/3780#issuecomment-362880275","issue_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/3780","id":362880275,"user":{"login":"alexjsdev","id":4146729,"avatar_url":"https://avatars0.githubusercontent.com/u/4146729?v=4","gravatar_id":"","url":"https://api.github.com/users/alexjsdev","html_url":"https://github.com/alexjsdev","followers_url":"https://api.github.com/users/alexjsdev/followers","following_url":"https://api.github.com/users/alexjsdev/following{/other_user}","gists_url":"https://api.github.com/users/alexjsdev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexjsdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexjsdev/subscriptions","organizations_url":"https://api.github.com/users/alexjsdev/orgs","repos_url":"https://api.github.com/users/alexjsdev/repos","events_url":"https://api.github.com/users/alexjsdev/events{/privacy}","received_events_url":"https://api.github.com/users/alexjsdev/received_events","type":"User","site_admin":false},"created_at":"2018-02-04T04:35:51Z","updated_at":"2018-02-04T04:35:51Z","author_association":"NONE","body":"@KyleAMathews just saw that there's a newer version `1.9.178` and it looked like there was a fix merged for the hanging i was talking about... well it's true it doesn't hang there anymore but this is back now 😢: \r\n\r\n```\r\nerror Generating JavaScript bundles failed\r\n\r\n  Error: app-45a58aeb1a29bc012abd.js from UglifyJs\r\n  RangeError: Maximum call stack size exceeded```"}}
{"actor":{"display_login":"alexjsdev"}}