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
243 stars 72 forks source link

Cannot find module 'yeoman-generator' #118

Closed Krusty-San closed 1 year ago

Krusty-San commented 1 year ago

Easy-Ui5 version:

Node.js: v18.15.0
yeoman-environment: 3.15.1
generator-easy-ui5: 3.5.1
home: /usr/local/lib/node_modules/generator-easy-ui5
pluginsHome: /Users/ahmedismail/.npm/_generator-easy-ui5/plugin-generators

Available generators:
  - ui5-project: 0.3.1

OS/version:

MacOs Ventura Version 13.2.1

Steps to reproduce the problem:

npm install -g yo generator-easy-ui5
yo easy-ui5 project

What is the expected result?

The project is generated successfully.

What happens instead?

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

Cannot find module 'yeoman-generator'
Require stack:
- /Users/ahmedismail/.npm/_generator-easy-ui5/plugin-generators/generator-ui5-project/generators/additionalmodules/index.js
- /usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/util/esm.js
- /usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js
- /usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js
- /usr/local/lib/node_modules/yo/lib/router.js
- /usr/local/lib/node_modules/yo/lib/cli.js

Any other information? (attach screenshot if possible)

Screenshot 2023-03-24 at 2 21 28 PM
nicoschoenteich commented 1 year ago

Can you try and run yo easy-ui5 project --forceUpdate?

Looks odd to me that your pluginsHome is somewhere else than your home, but that's just a guess...

Krusty-San commented 1 year ago

Hello @nicoschoenteich,

Greetings! I've done that now, but the same error log is being produced

nicoschoenteich commented 1 year ago

Sort of unrelated but also maybe not: The project generator doesn't support node v18 yet, so you will have to move to v14/v16 anyway. Can you try that?

Krusty-San commented 1 year ago

Hello Nico,

Sorry for the late reply, I got swamped with work. Umm I've tried using node v16 but still same error Thanks for following up with me!

petermuessig commented 1 year ago

This is maybe the same issue like #122 - once the plugin generator is updated the npm install didn't run properly in the plugin generator and therefore dependencies are missing. We'll tackle it with a changing the behavior how Easy UI5 stores the plugin generators with an upcoming release.