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

Module parse failed with webpack #23

Closed
nicolas-despres opened this issue Sep 21, 2015 · 7 comments
Closed

Module parse failed with webpack #23

nicolas-despres opened this issue Sep 21, 2015 · 7 comments

Comments

@nicolas-despres
Copy link

Hi,
It is probably related to my yet limited knowlegde of weback but I installed this repo using npm and added

import ReactPivot from 'react-pivot';

As I am using ES6 in my project.
When I run my build I have the following error occuring:

ERROR in ./~/react-pivot/index.jsx
Module parse failed: C:\myfrontend\node_modules\react-pivot\index.jsx Line 197:
Unexpected token <
You may need an appropriate loader to handle this file type.

I did the same process with other libraries and did not have such error message.
Thanks in advance

@davidguttman
Copy link
Owner

I'm not familiar with webpack either, but I'm guessing that it's having trouble with the html tags in the jsx file. I'd recommend looking into how to set up https://babeljs.io/ with webpack or just use http://browserify.org/ which should just work.

@nicolas-despres
Copy link
Author

Yes you are right - let me close this as this has probably nothing to do with your library, sorry about that
Nicolas

@calebdel
Copy link

@nicolas-despres can you share how you have webpack setup with babel to get react-pivot working? I'm getting the same error you were.

@r1g0
Copy link

r1g0 commented Feb 20, 2016

I'm having this same problem, has anyone found a way to make it work?

@nicolas-despres
Copy link
Author

Sorry I have not yet
Le 20 févr. 2016 02:46, "r1g0" notifications@github.com a écrit :

I'm having this same problem, has anyone found a way to make it work?


Reply to this email directly or view it on GitHub
#23 (comment)
.

@ayozebarrera
Copy link

I'm having the same problem and I have a lot components working with jsx but the only one failing is index.jsx from your package. Anyone know how solve it?

@hoppy-kamper
Copy link
Contributor

see my answer on #47

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

6 participants