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

Unexpected token error #5

Open
kevinbarabash opened this issue Mar 27, 2019 · 5 comments
Open

Unexpected token error #5

kevinbarabash opened this issue Mar 27, 2019 · 5 comments

Comments

@kevinbarabash
Copy link

I tried running stylecleaup check on webapp, but babylon runs into some syntax it doesn't expect. Here's some of the output:

... javascript/wonder-blocks-package/fixtures_test.js javascript/ycla-package/ycla.js javascript/ycla-package/you-can-learn-anything-entry.js javascript/zero-rating-package/fixtures_test.js javascript/zero-rating-package/login-warning-modal.jsx.fixture.js
/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:4457
  throw err;
  ^

SyntaxError: Unexpected token (9:12)
    at Parser.pp$5.raise (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:4454:13)
    at Parser.pp.unexpected (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:1761:8)
    at Parser.pp$3.parseExprAtom (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3627:50)
    at Parser.parseExprAtom (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:7238:22)
    at Parser.pp$3.parseExprSubscripts (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3494:19)
    at Parser.pp$3.parseMaybeUnary (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3474:19)
    at Parser.pp$3.parseExprOps (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3404:19)
    at Parser.pp$3.parseMaybeConditional (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3381:19)
    at Parser.pp$3.parseMaybeAssign (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3344:19)
    at Parser.parseMaybeAssign (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:6474:20)

I'll try adding some console.logs to get some more info.

@jaredly
Copy link
Owner

jaredly commented Mar 27, 2019

huh, I wonder if it's a babel config thing

@kevinbarabash
Copy link
Author

most likely... I would've expected object spread or class properties to be the most likely issue, but they're in the list of parser plugins.

@Stephen2
Copy link
Contributor

Stephen2 commented Jun 4, 2019

I think this'll be closed be the recent PR merge #6

@ariabuckles
Copy link

@jaredly any chance you could publish this update to npm? (Also thanks; I love the project)

@BedoEbied
Copy link

/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:3274
    if (!this.options.errorRecovery) throw error;
                                     ^

SyntaxError: Unexpected token (112:64)
    at instantiate (/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:653:32)
    at constructor (/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:946:12)
    at FlowParserMixin.raise (/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:3270:19)
    at FlowParserMixin.unexpected (/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:3300:16)
    at FlowParserMixin.parseParenAndDistinguishExpression (/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:11507:12)
    at FlowParserMixin.parseParenAndDistinguishExpression (/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:5874:18)
    at FlowParserMixin.parseExprAtom (/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:11141:23)
    at FlowParserMixin.parseExprAtom (/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:7007:20)
    at FlowParserMixin.parseExprSubscripts (/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:10872:23)
    at FlowParserMixin.parseUpdate (/Users/abdelrahmanebied/.config/yarn/global/node_modules/@babel/parser/lib/index.js:10855:21) {
  code: 'BABEL_PARSER_SYNTAX_ERROR',
  reasonCode: 'UnexpectedToken',
  loc: Position { line: 112, column: 64, index: 3547 },
  pos: [Getter/Setter]
}

Node.js v19.8.1

using "[email protected]" with binaries:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants