if (!this.options.errorRecovery) throw error;
^
SyntaxError: 'await' is only allowed within async functions and at the top levels of modules. (1:16)
at constructor (C:\my-soft\decode-js\node_modules\@babel\parser\lib\index.js:353:19)
at Parser.raise (C:\my-soft\decode-js\node_modules\@babel\parser\lib\index.js:3277:19)
at Parser.raiseOverwrite (C:\my-soft\decode-js\node_modules\@babel\parser\lib\index.js:3293:17)
at Parser.parseMaybeUnary (C:\my-soft\decode-js\node_modules\@babel\parser\lib\index.js:10558:14)
at Parser.parseMaybeUnaryOrPrivate (C:\my-soft\decode-js\node_modules\@babel\parser\lib\index.js:10405:61)
at Parser.parseExprOps (C:\my-soft\decode-js\node_modules\@babel\parser\lib\index.js:10410:23)
at Parser.parseMaybeConditional (C:\my-soft\decode-js\node_modules\@babel\parser\lib\index.js:10387:23)
at Parser.parseMaybeAssign (C:\my-soft\decode-js\node_modules\@babel\parser\lib\index.js:10348:21)
at C:\my-soft\decode-js\node_modules\@babel\parser\lib\index.js:10318:39
at Parser.allowInAnd (C:\my-soft\decode-js\node_modules\@babel\parser\lib\index.js:11931:16) {
code: 'BABEL_PARSER_SYNTAX_ERROR',
reasonCode: 'AwaitNotInAsyncContext',
loc: Position { line: 1, column: 16, index: 16 },
pos: 16
}
手动放在async代码块里的话提示:
类型: sojsonv7
输入: input.js
输出: output.js
处理全局加密...
Error: code too short
代码如下:
直接丢进
input.js
的话提示:手动放在async代码块里的话提示:
怎么解决呀,求适配