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

Can't require() react-tools module #10

Closed
jriecken opened this issue May 30, 2013 · 3 comments · Fixed by #11
Closed

Can't require() react-tools module #10

jriecken opened this issue May 30, 2013 · 3 comments · Fixed by #11

Comments

@jriecken
Copy link

I'm trying to programatically invoke the JSX transformer (using the version of react-tools in the npm registry) by running something like

require('react-tools').transform(someCode);

Which then throws this error:

Error: Cannot find module './build/React'

If I comment out the lines in main.js that require/use ./build/React the react-tools module loads fine and the transformer runs correctly.

@zpao
Copy link
Member

zpao commented May 30, 2013

Bah, I changed build filenames last minute and didn't properly test the module after :( Thanks for finding this! I guess we should write some tests for the node module too, not just our phantomjs tests.

(Very) Short term, you should be able to change ./build/React to ./build/react and that will fix the problem.

@benjamn - I guess it's time to figure out what we want to do with npm versions vs library versions. Should we just bump them both for the time being?

@zpao
Copy link
Member

zpao commented May 30, 2013

Nope, that alone won't do it, we're not even packaging. I totally screwed up the node module :( Fix soon!

@jriecken
Copy link
Author

Yeah, doesn't look like there's even a build directory there. :)

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

Successfully merging a pull request may close this issue.

2 participants