Aurelia UI crashes on build server

After updating to 1.0.2 Aurelia CLI i can’t build my project on my build server.

I am met with this stacktrace:

[07:11:11]  async _ensureAnswer(answer, question, suggestion, _debug = []) {
[07:11:11]        ^^^^^^^^^^^^^
[07:11:11]SyntaxError: Unexpected identifier
[07:11:11]    at Object.exports.runInThisContext (vm.js:53:16)
[07:11:11]    at Module._compile (module.js:513:28)
[07:11:11]    at Object.Module._extensions..js (module.js:550:10)
[07:11:11]    at Module.load (module.js:458:32)
[07:11:11]    at tryModuleLoad (module.js:417:12)
[07:11:11]    at Function.Module._load (module.js:409:3)
[07:11:11]    at Module.require (module.js:468:17)
[07:11:11]    at require (internal/module.js:20:19)
[07:11:11]    at Object.<anonymous> (E:\TeamCity\buildAgent\work\95c6ae76aea50994\TrackTrace.Client\node_modules\aurelia-cli\lib\cli.js:4:12)
[07:11:11]    at Module._compile (module.js:541:32)
[07:11:11]Process exited with code 1

Is there anyone who had the same problem?

1 Like

Check your nodejs version. V8.9.0 is the minimum version required.

That error is due to old nodejs doesn’t understand async func.


The nodejs version is V10.15.0, both locally and on my building server.

But it was a was a good idea. Thank you

1 Like

You can have some script to print out result of node -v to double check the version. It is strange v10 will complain about the syntax.


I am notified by my build log:

[12:38:02][Step 5/21] + node-win-x64@10.15.0
1 Like

I got no idea why it complains.
@fkleuver any idea why nodejs on TeamCity complains about the syntax?

exports.ConsoleUI = class {
  async _ensureAnswer() {

Hello Huechunpeng

I have discovered the reason, and it was a bad upgrade, due to not considering the already existing design choices of my system, when using the recommended option to update the Aurelia Project folder.

Thank you very much for your help, which eventually made me realise the essential problem.