aurelia / cli

The Aurelia 1 command line tool. Use the CLI to create projects, scaffold components, and bundle your app for release.
MIT License
407 stars 133 forks source link

Latest enquirer release seems to break 'au build' with 'SyntaxError: Unexpected token =' #1203

Closed AshWhitear closed 1 year ago

AshWhitear commented 1 year ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: Getting an error on au build which seems to relate to new release of enquirer.

Last step fails with:

node_modules/enquirer/lib/queue.js:4
  _queue = [];
         ^

SyntaxError: Unexpected token =

Appears to work when I call: npm install enquirer@2.3.6 before the au build.

AshWhitear commented 1 year ago

Very appreciative and grateful for any help! Thanks! 🙏

3cp commented 1 year ago

I will have a look. The worse case is to pin the version in our dependencies.

3cp commented 1 year ago

The reason it failed you because you are using very very outdated nodejs v10. It doesn't support class field definition.

class SuchAs {
  aField = "init_val";
}

Nodejs v10 ended support in 2021. Please upgrade to latest LTS v18.

If you need to stay on nodejs v10 for a while. You can continue to use npm install enquirer@2.3.6 (it touches your package.json so the version will stay in your project).