SAP / generator-easy-ui5

Meta-generator various project types within the UI5 Universe
https://blogs.sap.com/2021/04/09/easy-ui5-3.0-from-community-contributions-to-community-plugins/
Apache License 2.0
230 stars 72 forks source link

Error Unexpected token '.' when running the easy-ui5 generator #96

Closed AlexanderK22 closed 2 years ago

AlexanderK22 commented 2 years ago

Easy-Ui5 version:

3.2.2

OS/version:

Kubuntu 21.04

Steps to reproduce the problem:

Run yo easy-ui5

What is the expected result?

Further prompts to create a project

What happens instead?

Displays error Unexpected token '.'

Any other information? (attach screenshot if possible)

grafik

nicoschoenteich commented 2 years ago

Can you run yo easy-ui5 --plugins to check your version? (4.3.0 is your yo installation, not easy-ui5)

AlexanderK22 commented 2 years ago

Running yo easy-ui5 --plugins results in the same error Unexpected token '.'. The easy-ui5 version is 3.2.2 then.

petermuessig commented 2 years ago

@AlexanderK22 Which node version, npm version, git version are you using?

AlexanderK22 commented 2 years ago

@petermuessig The node version is v12.21.0, npm is 8.5.0 and git is 2.30.2.

Using an easy-ui5 version prior to 3.2 works just fine.

petermuessig commented 2 years ago

It's related to the usage of optional chaining in the generator which is not supported on Node v12: https://stackoverflow.com/questions/59574047/how-to-use-optional-chaining-in-node-js-12

Can you use a higher version of Node.js? V14? V12 goes OOM end of April 2022.

@nicogeburek we should upgrade the min requirement in the readme to use at least Node.js 14.

nicoschoenteich commented 2 years ago

https://github.com/SAP/generator-easy-ui5/pull/97

AlexanderK22 commented 2 years ago

Updated Node.js to v16.14.0 and the easy-ui5 generator works as expected.