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

Choking on jsx #5

Closed
winkler1 opened this issue Feb 27, 2015 · 7 comments
Closed

Choking on jsx #5

winkler1 opened this issue Feb 27, 2015 · 7 comments
Labels

Comments

@winkler1
Copy link

Am getting this--

15:19:21 test.1 | ERROR in .//react-ace/src/ace.jsx
15:19:21 test.1 | Module parse failed: /Users/jeff.winkler/repos/content_creator/node_modules/react-ace/src/ace.jsx Line 99: Unexpected token <
15:19:21 test.1 | You may need an appropriate loader to handle this file type.
15:19:21 test.1 | | height: this.props.height
15:19:21 test.1 | | };
15:19:21 test.1 | | return (

);
15:19:21 test.1 | | }
15:19:21 test.1 | | });
15:19:21 test.1 | @ .//react-ace/index.js 1:17-41

@securingsincity
Copy link
Owner

I'll investigate. Question what are you using to load the jsx? Webpack? Browserify? Something else?

@securingsincity
Copy link
Owner

Ok looked into it and it should be fixed with 1.1.2. I didn't have the pragma set on the jsx file.
Which should be fixed now. I was able to get it working after that. Also if you are using jsx-loader you can use the insertPragma=React.DOM setting to fix this error.

Please confirm the fix.

@securingsincity
Copy link
Owner

https://github.com/securingsincity/react-ace-webpack-example a working example using webpack

@zanesterling
Copy link
Contributor

Still getting this issue. Having a js-transpiled version would be nice.

@timdoes
Copy link

timdoes commented Jul 1, 2015

I am seeing this error as well.

package.json

  "dependencies": {
    "axios": "^0.5.4",
    "brace": "^0.5.1",
    "firebase": "^2.2.7",
    "re-base": "0.0.11",
    "react": "^0.13.3",
    "react-ace": "^2.0.1",
    "react-router": "^0.13.3",
    "reactfire": "^0.4.0"
  },
  "devDependencies": {
    "babel-core": "^5.6.15",
    "babel-loader": "^5.2.2",
    "node-libs-browser": "^0.5.2",
    "webpack": "^1.10.0"
  }

webpack.config.js

module.exports = {
  entry: "./app/App.js",
  output: {
    filename: "public/bundle.js"
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        exclude: /(node_modules|bower_components)/,
        loader: 'babel'
      }
    ]
  }
}

Thanks for the help.

@ryoia
Copy link

ryoia commented Jul 15, 2015

same issue, using webpack and babel. similar package.json and webpack.config.js as above.

@nathanborror
Copy link

Also getting this. Reopen?

ERROR in ./~/react-ace/src/ace.jsx
Module parse failed: /Users/nathan/Google Drive/Go/src/github.com/nathanborror/wiki/node_modules/react-ace/src/ace.jsx Line 86: Unexpected token <
You may need an appropriate loader to handle this file type.
|       height: this.props.height
|     };
|     return (<div id={this.props.name} onChange={this.onChange} style={divStyle}></div>);
|   }
| });
 @ ./~/react-ace/index.js 1:17-41

dennisoelkers pushed a commit to dennisoelkers/react-ace that referenced this issue Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants