Skip to content

fix: report missing local generator paths - #950

Closed
Doomguy-BFG9000 wants to merge 1 commit into
yeoman:mainfrom
Doomguy-BFG9000:fix/missing-local-generator
Closed

Doomguy-BFG9000 wants to merge 1 commit into
yeoman:mainfrom
Doomguy-BFG9000:fix/missing-local-generator

Conversation

@Doomguy-BFG9000

Copy link
Copy Markdown

Purpose of this pull request?

  • Documentation update
  • Bug fix
  • Enhancement
  • Other, please explain:

What changes did you make?

Report the path when a command points to a missing local generator. Check each command in a chain and recognize explicitly relative paths with forward slashes or the native Windows separator. The new diagnostic applies when the filesystem reports that the path or one of its components is missing.

Refs #854.

Is there anything you'd like reviewers to focus on?

The four subprocess regressions reproduced the generic npm install suggestion on the original CLI and passed with the fix. On Windows Node.js 22.23.4, npm test passed all 41 tests. Additional CLI probes covered a missing path after a successful command in a chain, named and scoped generators, and errors from existing local generators. The original repro also returned the new diagnostic on Windows Node.js 24.22.1.

@mshima

mshima commented Dec 3, 2026

Copy link
Copy Markdown
Member

Thank you for the investigation and the fix!

The undefined comes from yeoman-environment: create() of a string that is not a namespace and does not resolve to a generator reported the error of a namespace not installed, whose hint is undefined for a path. Fixing it there covers every form of path (relative, absolute, without ./, Windows) and every user of the environment, without a check in yo before env.run():

yo depends on yeoman-environment ^8.9.0, so the next release of the environment reaches yo without a change here. Closing this one in favor of those.

@mshima mshima closed this Dec 3, 2026
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

Successfully merging this pull request may close these issues.

2 participants