Why do React Native packages compile with SyntaxError: "Support for the experimental syntax 'jsx' isn't currently enabled"? #2470
-
In my project, I'm using the reanimate library to add animations, but I'm receiving an error package.json webpack.config.js |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I'm having the same error |
Beta Was this translation helpful? Give feedback.
-
There's a comment on L15 of your webpack config that says "Add every directory that needs to be compiled by Babel..." And before that is a comment block with more explanations. And the error messages you're getting are telling you the same thing. But you haven't added any RN packages to your babel loader config which is why the modules still have JSX syntax in them. If after reading documentation you still have problems configuring your bundler, I suggest using Expo which will take care of this work out-of-the-box. |
Beta Was this translation helpful? Give feedback.
There's a comment on L15 of your webpack config that says "Add every directory that needs to be compiled by Babel..." And before that is a comment block with more explanations. And the error messages you're getting are telling you the same thing. But you haven't added any RN packages to your babel loader config which is why the modules still have JSX syntax in them.
If after reading documentation you still have problems configuring your bundler, I suggest using Expo which will take care of this work out-of-the-box.