capaj / require-globify

transform for browserify, which allows to require files with globbing expressions
MIT License
70 stars 11 forks source link

Parse error in async function #33

Open andre-kornetzky opened 3 years ago

andre-kornetzky commented 3 years ago

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.