You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, okay, maybe if I post this problem I'll figure it out, too. So it looks like compilation is failing on line 7 (an invalid token failure, telling me that the inline JSX is the problem).
11 Jan 16:10:23 - error: Compiling of 'app/bar.jsx' failed. app/bar.jsx: Unexpected token (7:11)
Okay, so I'm still not really sure what I'm doing, but doing this seemed to fix the immediate problem:
npm install --save babel-preset-react
But another problem arises at runtime when I get one of these errors:
Uncaught Error: Cannot find module "react" from "bar"
Clearly it's a missing dependency. But I'm actually a little confused about whether this should be considered a runtime or a compile-time dependency, and how it should be installed. And yes I've looked for a complete example of brunch with react, but they all use the react-brunch plugin which (according to it's own website) is deprecated. :(
Aha, I figured it out. Brunch is very slick, but could definitely use some more docs. One thing that bit me, as trivial as it may seem, was that I had a locally installed copy in my project that was shadowing my (more recent) globally installed brunch - which had the npm support I wanted.
Well, okay, maybe if I post this problem I'll figure it out, too. So it looks like compilation is failing on line 7 (an invalid token failure, telling me that the inline JSX is the problem).
11 Jan 16:10:23 - error: Compiling of 'app/bar.jsx' failed. app/bar.jsx: Unexpected token (7:11)
Here is the content of bar.jsx:
Here is my brunch config:
The text was updated successfully, but these errors were encountered: