Skip to content

SyntaxError showing token not in the input #6427

@msridhar

Description

@msridhar
  • Version: v6.0.0
  • Platform: Mac OS X 10.11.4

Givenfoo.js just containing the following:

++

When I run node foo.js, I get:

/private/tmp/foo.js:3
});
^
SyntaxError: Unexpected token }
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:511:25)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Function.Module.runMain (module.js:575:10)
    at startup (node.js:159:18)
    at node.js:444:3

But the token } does not appear in foo.js. This could be related to #3411, not sure. When I run with just v8, I get an appropriate error:

/tmp/foo.js:1: SyntaxError: Unexpected end of input
++
^^
SyntaxError: Unexpected end of input

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions