question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version 10.0.0 breaks in Chrome 59 (or lower)

See original GitHub issue

In Chrome version 59 (or lower) react-async version 10.0.0 breaks.

Browser reports Uncaught SyntaxError: Unexpected token ..., which appears to be located in react-sync. Here’s the specific line: ...getStatusProps(getInitialStatus(initialValue, promise || promiseFn))

error

This appears to be due to lack of transpilation from ES6 to ES5 in this particular version of react-async.

Downgrading to version of react-async 9.0.0 fixes the issue.

Although Chrome version 59 is 2.5 years old, there’s a significant number of users using it, who reported an issue where application would load a blank screen.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ghengeveldcommented, Jan 27, 2020

Our build pipeline was overhauled when we switched to TypeScript for v10. Apparently the new setup no longer transpiles object spread props. I’m willing to accept a PR if there’s a simple fix, but only for the sake of convenience.

This project targets the latest ECMAScript standard (or whatever TypeScript supports). If you need to target a browser which does not support this, you’ll have to handle transpilation yourself. Usually this will automatically be handled by the framework you use (CRA, Next.js, Gatsby). We can’t possibly provide pre-transpiled packages for all environments, and we also don’t want to cripple the package by targeting the lowest common denominator (whatever that may be).

Thanks for providing that excellent explanation @mbark, would you be willing to add a section about this to the installation docs? The docs are on GitHub too.

1reaction
mbarkcommented, Jan 27, 2020

We also ran into this problem and fixed it by transpiling our dependencies ourselves.

To build your node_modules you need to have a babel.config.js file and not a .babelrc (more about that in babel’s documentation).

Then in your webpack.config.js allow node_modules to be built, point to your config file (and probably turn on caching since build times will increase now that node_modules are built). I’ve excluded core-js from being built with babel as it shouldn’t be transpiled.

{
  test: /\.(js|jsx)$/,
  exclude: /\/node_modules\/core-js\//,
  use: [{
    loader: 'babel-loader',
    options: {
      configFile: './babel.config.js',
      cacheDirectory: true,
    }
  }]
}

As I understand it transpiling node_modules also seems to be the recommended way to solve this problem, see #51 for @ghengeveld’s response to a similar problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Chrome update problems & failed updates - Google Support
Try the possible fixes below. Download Chrome again. It's possible that some files are missing on your computer. To fix, follow these steps:...
Read more >
Google Chrome 10.0.0 - Community - Chocolatey Software
Version Downloads Last Updated Status Google Chrome 107.0.5304.107 1316395 Wednesday, November 9, 2022 Approved Google Chrome 107.0.5304.88 1383064 Friday, October 28, 2022 Approved Google Chrome 107.0.5304.63...
Read more >
Google Chrome version history - Wikipedia
Google Chrome is a freeware web browser developed by Google LLC. The development process is split into different "release channels", each working on...
Read more >
Message: session not created: This version of ChromeDriver ...
Go to your Chrome settings -> About Chrome -> Check version and download chromedriver from Below according to your Chrome version ...
Read more >
Enable Adobe Flash on Chrome after End of Life
In order for this workaround, you will need Chrome Version 87 or earlier. Version 88 does not include Adobe Flash. On Windows, you'll...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found