Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hint for Yeoman generator version #1765

Open
Lotes opened this issue Dec 2, 2024 · 4 comments
Open

Hint for Yeoman generator version #1765

Lotes opened this issue Dec 2, 2024 · 4 comments

Comments

@Lotes
Copy link
Contributor

Lotes commented Dec 2, 2024

I had a bad setup on my system and realized too late that the Yeoman generator was outdated.
A hint during the start would be good to be sure which version you are running. You could also add a hint what version is the latest if you like.

My setup was with Volta and Node installed in parallel, with the old generator in NPM. It was not obvious where the generator was coming from.

@spoenemann
Copy link
Contributor

You can also run yo without arguments to see all installed generators and update them when necessary.

@Lotes
Copy link
Contributor Author

Lotes commented Dec 9, 2024

Yes, but you will not retrieve any version information. That was the point: when you installed the generator globally (like months ago) and run it, you can not be certain which version it was.
Reinstalling it globally was not helping me, because it was installed using Volta but used with NPM over Yeoman.

@kaisalmen
Copy link
Contributor

@Lotes what about printing version info similar to here:
https://github.com/TypeFox/monaco-languageclient/blob/main/package.json#L49

This is helpful in CI or local dev context. Something similar could be invoked before calling yo (either with npm run directly from and node context). Useful info could come from the following commands:
Global scope:

yo --version
yo --generators

Local scope:

yo --local-only --version
yo --local-only --generators

@kaisalmen
Copy link
Contributor

And maybe we should move away from advising people to use npm -g as it leads to such problems. I fell into similar traps before myself and have witnessed others to do so, too.

For all tools manageable with volta (node, npm, pnpm, yarn, ng and yo) I have moved away from any other installation locally for those tools. This makes handling such things a lot easier and more reliable. Sorry, this is not an advertisement it is just a description of a less painful experience. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants