Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error Running Relay in MS Edge #665

Closed
kumarharsh opened this issue Dec 8, 2015 · 3 comments
Closed

Error Running Relay in MS Edge #665

kumarharsh opened this issue Dec 8, 2015 · 3 comments

Comments

@kumarharsh
Copy link

I'm getting an error while trying to run an app which has Relay in the Edge browser. The browser keeps throwing this error:

The use of a keyword for an identifier is invalid

I have tracked it down to the file: RelayTaskScheduler.js in the compiled code (which is generated by Babel):

var RelayTaskScheduler {
  ...
  await: function await() {...}
}

I've verified that this is the problem by replacing the await function name with something non-reserved. await is a future reserved keyword: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FReserved_Words#Future_reserved_keywords

@plievone
Copy link
Contributor

plievone commented Dec 8, 2015

Interesting, await is missing from https://github.com/estools/esutils which affects babel. 'enum' is there.

@hannesj
Copy link

hannesj commented Dec 10, 2015

The same issue is also making us unable to bundle relay using Webpack 2 beta (See webpack/webpack#1725)

kassens added a commit to kassens/relay that referenced this issue Dec 11, 2015
Apparently `await` is missing from some lists of reserved words. Typically Babel
or minifiers should quote `await` like they quote `function`.

Instead of waiting for changes in Babel or webpack to trickle down, let's rename
this for now.

Fixes facebook#665.
@gschammah
Copy link

is this fix going to be published to npm soon? thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants