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
Uncaught SyntaxError: Unexpected token < #40
Comments
Indeed. This is deceptive and you got a really bad error message. We need to fix that (amongst other things). Right now scripts need to be prefixed with a docblock to assist the transformer. The fact that it's missing here is causing it to not recognize that it should be converting to JSX. We very much want to fix this ASAP. Sorry that it's causing you issues! In the mean time, just prefixing your code with this docblock should fix your problem. Please close this out if it does.
or the condensed version will work too
|
This works, thanks tremendously. |
Meet this problem too. Maybe it should be warned in the documentation. |
Follow up: we've updated to stress this in several places. Hopefully it's okay now. |
wow, took me a while to track this down . Can we just fix this the right way? |
I'd like to change the default file extension to |
+1 |
Tried with new version .11.rc, seems no fix in this version! Am I missing something? <script src="http://fb.me/react-0.11.0-rc1.js"></script> <script src="http://fb.me/JSXTransformer-0.11.0-rc1.js"></script> |
@NSAKHAN It's not supposed to work (right now), you're trying to return multiple components for the root, you can only return one. EDIT: Oh wait, this was for the docblock, you need to add |
With this change, as well as a change to react-fs, this repo will be able to support Node.js 12 (tested locally). I can't seem to find the repo for react-fs though to propose the change ¯\_(ツ)_/¯
Even with the most basic tutorial code, I'm unable to get past this error thrown at JSXTransformer.js:46.
Error Trace:
Full source:
Running Chrome 27.0.1453.93, issue also appears in Firefox 21.
The text was updated successfully, but these errors were encountered: