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

/d3rrc/src/title.jsx:11 <h2 {...props} className={classNames}>{title}</h2> ^ Unexpected token < #11

Open
mzrausyanfikri opened this issue Jan 4, 2016 · 3 comments

Comments

@mzrausyanfikri
Copy link

I got this error when I try to require('d3rrc') in my project

@jdarling
Copy link
Owner

jdarling commented Jan 4, 2016

Hmm, wonder if it has something to do with the Babel version. Can you take a look and see what version of Babel your using? As that's basically an error stating that the JSX loader/transformer isn't there.

@wooters
Copy link

wooters commented Jan 21, 2016

@jdarling, I'm having a similar problem. I'm trying to use var D3RRC = require('d3rrc'); in my project (app.jsx) and when I run npm install I get something like:

ERROR in ./~/d3rrc/src/title.jsx
Module parse failed: .../node_modules/d3rrc/src/title.jsx Line 11: Unexpected token <
You may need an appropriate loader to handle this file type.
...

To install your package, I just did:

npm install d3rrc --save

and nothing else.

Regarding Babel, at the end of my package.json file, it has:

{
...
"devDependencies": {
  "babel-loader": "~6.2.1",
  "webpack": "~1.12.10",
  "babel-preset-react": "~6.3.13",
  "babel-core": "~6.4.0"
}

I'm a total newbie, so I don't really understand how this works. Should I have tried to do some sort of build of your package in my node_modules directory before trying to run npm install on my project?

Thanks for your help and for this great looking utility!

@jdarling
Copy link
Owner

Ahh Babel 6, I haven't tried D3RRC with Babel 6. I'll see if I can get some time and look into that as I know all the changes will have broke something.

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

3 participants