React-modal: react-scripts build failure during UglifyJs due to functions declaration syntax

Created on 2 Mar 2017  路  3Comments  路  Source: reactjs/react-modal

Summary:

react-scripts build failure on projects, due to 2 syntax "errors":

  • SyntaxError: Unexpected token punc 芦(禄, expected punc 芦:禄 [./~/react-modal/lib/components/Modal.js:103,0]
  • SyntaxError: Unexpected token punc 芦(禄, expected punc 芦:禄 [./~/react-modal/lib/components/ModalPortal.js:80,0]

Steps to reproduce:

  1. Have a project using react-modal dependency
  2. Launch the production package command npm run build

Expected behavior:

Just want the package command to be successful.

Additional notes:

The reason of this error is simple, it's due to the used syntax for functions declaration:

  • not working: removePortal () { and open () {
  • working: removePortal: function () { and open: function () {
duplicate

Most helpful comment

thanks for the other issue link ;)

All 3 comments

confirming

Please, follow #336.

thanks for the other issue link ;)

Was this page helpful?
0 / 5 - 0 ratings