{ Error: Line 1: Unexpected token
at ErrorHandler.constructError (/Users/jordanriser/workspace/generators/generator-react-app/node_modules/esprima/dist/esprima.js:5012:22)
at ErrorHandler.createError (/Users/jordanriser/workspace/generators/generator-react-app/node_modules/esprima/dist/esprima.js:5028:27)
at JSXParser.Parser.unexpectedTokenError (/Users/jordanriser/workspace/generators/generator-react-app/node_modules/esprima/dist/esprima.js:1985:39)
at JSXParser.Parser.tolerateUnexpectedToken (/Users/jordanriser/workspace/generators/generator-react-app/node_modules/esprima/dist/esprima.js:1998:42)
at JSXParser.Parser.parseStatementListItem (/Users/jordanriser/workspace/generators/generator-react-app/node_modules/esprima/dist/esprima.js:3371:31)
at JSXParser.Parser.parseScript (/Users/jordanriser/workspace/generators/generator-react-app/node_modules/esprima/dist/esprima.js:4723:29)
at Object.parse (/Users/jordanriser/workspace/generators/generator-react-app/node_modules/esprima/dist/esprima.js:122:61)
at writing (/Users/jordanriser/workspace/generators/generator-react-app/generators/dialog/index.js:13:27)
at Object.<anonymous> (/Users/jordanriser/workspace/generators/generator-react-app/node_modules/yeoman-generator/lib/index.js:417:23)
at /Users/jordanriser/workspace/generators/generator-react-app/node_modules/run-async/index.js:25:25 index: 0, lineNumber: 1, description: 'Unexpected token' }
Relevant references
I'm using yeoman to try to read an AST and add some new content to it in my generator. The file gets read just fine and produces the above code string, when I add the esprima parsing into it I get that error with no other information
I pasted this code into the parser on the esprima website and on line 24 I get a syntax error Error: Line 24: Unexpected token <
This is valid JSX so I'm having some truble understanding what the error is and how I need to fix it
Steps to reproduce
Expected output
A valid AST
Actual output
Relevant references
I'm using yeoman to try to read an AST and add some new content to it in my generator. The file gets read just fine and produces the above code string, when I add the esprima parsing into it I get that error with no other information
I pasted this code into the parser on the esprima website and on line 24 I get a syntax error
Error: Line 24: Unexpected token <
This is valid JSX so I'm having some truble understanding what the error is and how I need to fix it