-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Closed
Labels
type: question or discussionIssue discussing or asking a question about GatsbyIssue discussing or asking a question about Gatsby
Description
Description
After upgrading Gatsby to 1.9.167, I'm getting the following error when I try to run gatsby build
:
error Generating JavaScript bundles failed
Error: component---src-templates-post-jsx-dbdaebf346a9292b96a8.js from UglifyJs
SyntaxError: Unexpected token: name (isLastCharLower) [./~/camelcase/index.js:4,0]
The 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.
The same app works fine with 1.9.166. It's most likely caused by some changes introduced in #3369, other changes introduced in this version don't look suspicious.
To replicate this issue create a new Gatsby project, run yarn add camelcase
, import and call camelcase
in any component and run gatsby build
.
617dev, dagouzhi, ryami333, Jaikant, chadwatson and 7 more
Metadata
Metadata
Assignees
Labels
type: question or discussionIssue discussing or asking a question about GatsbyIssue discussing or asking a question about Gatsby