Skip to content

Parse error in async function #33

@andre-kornetzky

Description

@andre-kornetzky

I get the following error message when calling browserify:

SyntaxError: Unexpected token (7:6) (while require-globify was processing C:\...\commons\script.js) while parsing file: C:\...\commons\script.js
    at Parser.pp$4.raise (C:\...\node_modules\acorn\dist\acorn.js:2927:15)
    at Parser.pp.unexpected (C:\...\node_modules\acorn\dist\acorn.js:698:10)
    at Parser.pp.semicolon (C:\...\node_modules\acorn\dist\acorn.js:675:66)
    at Parser.pp$1.parseExpressionStatement (C:\...\node_modules\acorn\dist\acorn.js:1154:10)
    at Parser.pp$1.parseStatement (C:\...\node_modules\acorn\dist\acorn.js:889:26)
    at Parser.pp$1.parseTopLevel (C:\...\node_modules\acorn\dist\acorn.js:755:23)
    at Parser.parse (C:\...\node_modules\acorn\dist\acorn.js:555:17)
    at Function.parse (C:\...\node_modules\acorn\dist\acorn.js:578:37)
    at Object.parse (C:\...\node_modules\acorn\dist\acorn.js:5143:19)
    at module.exports (C:\...\node_modules\falafel\index.js:23:22)

The affected line in the file is:
async function myFunction() {

It looks like newer Ecma-Script versions are not supported?

Thanks for the support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions