Skip to content

Unexpected token ILLEGAL in Chrome 41 with [email protected] #4221

Closed
@dmitrizzle

Description

@dmitrizzle

Is this a bug report?

Yes.

Did you try recovering your dependencies?

Yes.

Environment

  1. node -v: v8.4.0
  2. npm -v: 5.8.0
  3. yarn --version (if you use Yarn): 1.3.2
  4. npm ls react-scripts (if you haven’t ejected): [email protected]

Then, specify:

  1. Operating system: MacOS Sierra 10.12.6
  2. Browser and version (if relevant): Chrome 41.0.2272.89

Steps to Reproduce

1

  • Added the following to browserlist key in package.json:
"production": [
  "Chrome >= 41",
  "last 2 Safari versions",
  "last 2 FireFox versions",
  "last 1 Edge versions",
  "not dead",
  "last 2 iOS versions",
  "last 2 Android versions"
]

2

  • yarn build - no errors, everything seems OK.

3

  • serve -s build and open http://localhost:5000 in Chrome 41.

Expected Behavior

Browser displays the app with no JavaScript errors in console.

Actual Behavior

  • Getting Uncaught SyntaxError: Unexpected token ILLEGAL error in Chrome 41.
  • Modern Chrome (65) has no issues.

I have referred to the StackOverflow answer and went through the minified searching for weird characters and found none. I have also "beautified" the code and found no issues with it.

Reproducible Demo

https://github.com/dmitrizzle/Analog.Cafe - you may reproduce my steps by cloning the repo. You do not need to spin up API server to witness the issue, just the repo given. Please use develop branch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions