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 in CRA with 0.1.3, can't compile experimental syntax. #23

Closed
KerimG opened this issue Apr 18, 2020 · 4 comments
Closed

Error in CRA with 0.1.3, can't compile experimental syntax. #23

KerimG opened this issue Apr 18, 2020 · 4 comments
Labels
fixed Request complete

Comments

@KerimG
Copy link

KerimG commented Apr 18, 2020

Adding metro4-react to a create-react-app seems to fail like so

SyntaxError: C:\Users\kg\code\metro-example\node_modules\metro4-react\src\components\tag-input\tag-input.js: Support for the experimental syntax 'classProperties' isn't currently enabled (30:14):

  28 |     }
  29 | 
> 30 |     onChange = tags => {
     |              ^
  31 |         this.props.onChange(tags);
  32 |     };
  33 | 

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.

Just like in this issue #20, I suggest avoiding using experimental syntax or transpiling down to ES5 for npm releases.

@KerimG KerimG changed the title Error in CRA with 0.1.3 Error in CRA with 0.1.3, can't compile experimental syntax. Apr 18, 2020
@lepresk
Copy link

lepresk commented Apr 30, 2020

I'm getting same error :( help me to fix

@olton
Copy link
Owner

olton commented Apr 30, 2020

I work on the fix for this problem. Unfortunately, CRA authors do not want to include support for such syntax in their application. At the moment, you can use the clone from https://github.com/olton/react-scratch to create a prototype application.

@olton
Copy link
Owner

olton commented Apr 30, 2020

fixed in 0.1.4

@olton
Copy link
Owner

olton commented May 8, 2020

@olton olton added the fixed Request complete label Aug 5, 2020
@olton olton closed this as completed Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Request complete
Projects
None yet
Development

No branches or pull requests

3 participants