Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Create React App 2 Build Error #51

Open
SCasarotto opened this issue Oct 2, 2018 · 3 comments
Open

Create React App 2 Build Error #51

SCasarotto opened this issue Oct 2, 2018 · 3 comments

Comments

@SCasarotto
Copy link
Contributor

SCasarotto commented Oct 2, 2018

Hey @selvagsz,

I updated one of my projects to CRA2 and was attempting to build. Received the following error:

Failed to minify the bundle. Error: static/js/1.fa0b5eff.chunk.js from Terser

From there I started into my project to try to narrow down what was causing this error. After isolating this more, it looks like it is this package. To prove this to myself I set up a blank app and received the same error.

Steps to reproduce:

  1. npx create-react-app my-app
  2. cd my-app
  3. yarn add react-power-select
  4. in /src/App.js add import { PowerSelect } from 'react-power-select'
  5. yarn build

I am also going to post about this in CRA but figured if it is something that has to be fixed here I would give you aheads up. (facebook/create-react-app#5250)

Will keep you posted.

@selvagsz
Copy link
Owner

selvagsz commented Oct 3, 2018

Thanks for reporting @SCasarotto . As I read up, I see the issue is related to Terser bug unable to handle func defined inside else clause (which exists in shipshapecode/tether@4ca3d2e#diff-16aa9b816bdda8647812b6bd5bdfcffaR1256)

facebook/create-react-app#5250 (comment)

@SCasarotto
Copy link
Contributor Author

Tested and appears to be fixed.
facebook/create-react-app#5281
facebook/create-react-app#5250 (comment)

@Timer
Copy link

Timer commented Oct 4, 2018

This is still a bug, we just masked it. I'd leave this open for tracking.

@selvagsz selvagsz reopened this Oct 4, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants