ui5-community / generator-ui5-ts-app

Generator for UI5 applications using TypeScript which use the official UI5 tooling. This generator was built as a plug-in for the community project Easy UI5 by SAP.
Apache License 2.0
19 stars 15 forks source link

Issue with easy ui5 ts project creation #24

Closed tylervz closed 1 year ago

tylervz commented 1 year ago

Easy-Ui5 version:

Run yo easy-ui5 --plugins to print all relevant version strings

Node.js: v18.16.0 yeoman-environment: 3.19.3 generator-easy-ui5: 3.6.1 home: /Users/tylervanzanten/.nvm/versions/node/v18.16.0/lib/node_modules/generator-easy-ui5 pluginsHome: /Users/tylervanzanten/.npm/_generator-easy-ui5/plugin-generators

Available generators:

OS/version:

Mac OS 13.4 (22F66)

Browser/version (+device/version):

Steps to reproduce the problem:

  1. Run npm install -g yo generator-easy-ui5
  2. Run yo easy-ui5 ts-app

What is the expected result?

I will asked a series of questions and after I am finished answering an OpenUI5 TypeScript application will have been generated.

What happens instead?

     _-----_
    |       |    ╭──────────────────────────╮
    |--(o)--|    │  Welcome to the easy-ui5 │
   `---------´   │     3.6.1 generator!     │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

✖ An error occured while running easy-ui5:app#prompting
Error easy-ui5 ts-app

Cannot find module 'semver'
Require stack:
- /Users/tylervanzanten/.npm/_generator-easy-ui5/plugin-generators/generator-ui5-ts-app/generators/app/index.js
- /Users/tylervanzanten/.nvm/versions/node/v18.16.0/lib/node_modules/yo/node_modules/yeoman-environment/lib/util/esm.js
- /Users/tylervanzanten/.nvm/versions/node/v18.16.0/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js
- /Users/tylervanzanten/.nvm/versions/node/v18.16.0/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js
- /Users/tylervanzanten/.nvm/versions/node/v18.16.0/lib/node_modules/yo/lib/router.js
- /Users/tylervanzanten/.nvm/versions/node/v18.16.0/lib/node_modules/yo/lib/cli.js

Any other information? (attach screenshot if possible)

petermuessig commented 1 year ago

Hi @tylervz,

I just opened a PR #25 to provide a fix for this issue (the dependency to semver was not explicitly listed).

FYI: the PR #25 comes with general modifications of this template to align it with the latest best practices and clean it up further. Review should take place the next couple of days...

Thanks for pointing this out!