I encountered an issue that is causing difficulties in utilizing async/await or yield/generators.
Initially, I utilized the aurelia skeleton for typescript & asp5 (aspnetcore) with the default target set to es5. To incorporate async/await in my TypeScript code, I attempted to switch the target to es6.
Upon modifying the tsconfig.json from es5 to es6, a few issues arose. Initially, there were duplication errors which I managed to resolve. However, the remaining concern relates to errors in the dependencies within aurelia-bundler.
Note: Consider this as the root for the file paths in the stack trace: C:\My\My.App\src\My.App.Web\node_modules\aurelia-bundler\node_modules\systemjs-builder
[13:37:07] 'bundle-dev' errored after 1.17 s
[13:37:07] Error: Unexpected token: name (App) (line: 13, col: 8, pos: 594)
Error
at new JS_Parse_Error (eval at <anonymous> (C:\..\node_modules\uglify-js\tools\node.js:22:1), <anonymous>:1526:18)
<!-- Truncated for brevity -->
[13:37:07] 'bundle' errored after 1.57 min
[13:37:07] Error in plugin 'run-sequence(bundle-dev)'
Message:
bundle-dev promise
Could anyone shed light on why this might be happening? I will update with any additional information required.
Thank you immensely.
UPDATE 1
One of the build steps for this project involves using aurelia-bundler to generate javascript bundles referenced by the app. This has mainly remained untouched from the aurelia skeleton. Identifying the code at line 13 is rather challenging.
I tried upgrading Node from v4 to v6, but the error persisted, so I reverted back to v4.4.4.
In addition, I made attempts to update the system-js configuration within config.js without success.
Here are my current configurations:
tasks/bundles.js
<!-- Configuration details here -->
wwwroot/config.js
<!-- Configuration details here -->