-
Notifications
You must be signed in to change notification settings - Fork 775
Closed
Description
My code is like this
const filename = './src/components/SignUpForm/SignUpForm.js';
const ast = esprima.parse(fs.readFileSync(filename, 'utf-8'), { tokens: true, jsx: true, sourceType: 'module' });
The SignUpForm.js' code is like
40 - export class SignUpForm extends Component {
41 - static displayName = 'SignUpForm';
42 - static whyDidYouRender = true;
Getting the following error message. Searching the Internet but not able to get a list of all options to try.
/Users/narendra/Coding/prophecy/metaindex/frontend/node_modules/esprima/dist/esprima.js:1995
throw this.unexpectedTokenError(token, message);
^
Error: Line 41: Unexpected token =
at ErrorHandler.constructError (/Users/narendra/Coding/prophecy/metaindex/frontend/node_modules/esprima/dist/esprima.js:5012:22)
at ErrorHandler.createError (/Users/narendra/Coding/prophecy/metaindex/frontend/node_modules/esprima/dist/esprima.js:5028:27)
at JSXParser.Parser.unexpectedTokenError (/Users/narendra/Coding/prophecy/metaindex/frontend/node_modules/esprima/dist/esprima.js:1985:39)
at JSXParser.Parser.throwUnexpectedToken (/Users/narendra/Coding/prophecy/metaindex/frontend/node_modules/esprima/dist/esprima.js:1995:21)```
Please help
Metadata
Metadata
Assignees
Labels
No labels