Skip to content
This repository has been archived by the owner on May 4, 2020. It is now read-only.

Firefox throws "SyntaxError: let is a reserved identifier" #55

Closed
dineshvgp opened this issue Nov 4, 2015 · 5 comments
Closed

Firefox throws "SyntaxError: let is a reserved identifier" #55

dineshvgp opened this issue Nov 4, 2015 · 5 comments
Assignees

Comments

@dineshvgp
Copy link

react-validation-mixin works fine in chrome but not in firefox. A quick googling resulted in using "babel" to convert ES6 to ES5. I'm new to node framework. Can anyone help me to fix this?

@jurassix
Copy link
Owner

jurassix commented Nov 4, 2015

I'll take a look.

@dineshvgp
Copy link
Author

But this demo(http://jurassix.github.io/react-validation-mixin/) works well in firefox. It would be great if I get the source code of that.

@jurassix
Copy link
Owner

jurassix commented Nov 4, 2015

Code for the demo is hidden in plain sight ;) #54

@jurassix
Copy link
Owner

jurassix commented Nov 4, 2015

I searched the lib/ folder that is packaged with this library on npm i react-validation-mixin and find no references to lib.

It seems more likely that your also using ES6 and have introduced let keyword? Check your babel config?

@jurassix
Copy link
Owner

jurassix commented Nov 4, 2015

Ok I re-read your initial post. You need to use babel to transpile your source code into ES5.

Checkout the following from this library to get up and running quick:

.babelrc sets babel options
package.json look at the build:lib target and the babel-* deps

And that should do it. In this library the src/ folder is ES2015 and then transpiled to lib/. When you install from node you only pull down the lib/ folder which has the ES5 modules that should work in modern browsers.

Good luck.

@jurassix jurassix closed this as completed Nov 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants