dollarshaveclub / es-check

Checks the version of ES in JavaScript files with simple shell commands 🏆
https://github.com/yowainwright/es-check
MIT License
459 stars 38 forks source link

Interpreting the output #93

Closed rolinger closed 5 years ago

rolinger commented 5 years ago

I performed the following on my JS directory and got the following response:

What does the error actually mean? · error: SyntaxError: Invalid number (22:51)

If that is line #, then character in that line, then in my code its point to the last letter of an object key definition...not an a number. Is it a line/char after it has been minified or the line/char from the raw source file?

:\Users\RPO\dev\myap\www\js>es-check --module es6 *.js
S-Check: there were 1 ES version matching errors.

         ES-Check Error:
         ----
         · erroring file: servicesTride.js
         · error: SyntaxError: Invalid number (22:51)
         · see the printed err.stack below for context
         ----

         SyntaxError: Invalid number (22:51)
   at Parser.pp$4.raise (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:2769:13)
   at Parser.pp$8.readNumber (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:4997:36)
   at Parser.pp$8.getTokenFromCode (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:4875:17)
   at Parser.pp$8.readToken (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:4633:15)
   at Parser.pp$8.nextToken (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:4624:15)
   at Parser.pp$8.next (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:4581:8)
   at Parser.pp.eat (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:610:10)
   at Parser.pp$3.parsePropertyValue (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:2475:12)
   at Parser.pp$3.parseProperty (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:2467:8)
   at Parser.pp$3.parseObj (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:2413:23)
   at Parser.pp$3.parseExprAtom (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:2212:17)
   at Parser.pp$3.parseExprSubscripts (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:2074:19)
   at Parser.pp$3.parseMaybeUnary (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:2051:17)
   at Parser.pp$3.parseExprOps (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:1993:19)
   at Parser.pp$3.parseMaybeConditional (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:1976:19)
   at Parser.pp$3.parseMaybeAssign (C:\Users\RPO\AppData\Roaming\npm\node_modules\es-check\node_modules\acorn\dist\acorn.js:1951:19)
rolinger commented 5 years ago

User error. NM....closing.