I am using reason-scripts to build my app and when I create a production build I encountered the following error.
yarn run v1.3.2
$ react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/bs-nice/lib/js/src/nice.js:1222
Read more here: http://bit.ly/2tRViJ9
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I am using reason-scripts to build my app and when I create a production build I encountered the following error.
Here's Line 1222.
reason-scripts
is build on top ofcreate-react-app
so requires code to beES5
when minifying (see here).After changing both the
let
s on line 1222 and 1223 the build succeeds.