yeoman / yo

CLI tool for running Yeoman generators
http://yeoman.io
BSD 2-Clause "Simplified" License
3.85k stars 399 forks source link

Can't install Yeoman despite up to date Node and Npm #778

Open AmberRM99 opened 1 year ago

AmberRM99 commented 1 year ago

Error

Yeoman previously successfully installed and ran on the computer. Yesterday it was noted the Yo commands were no longer found, nor the Yo version despite not being uninstalled or files altered since last use. An attempt has been made to reinstall yeoman as it was no longer recognised, but it now appears impossible to install.


My environment

Expected behavior

  1. Update/Install Node to ensure up to date version
  2. Run npm install -g yo
  3. The terminal displays progress and confirms installation or shows an error
  4. Running yo --version reveals current version as proof of install

Current behavior

  1. Clean reinstall of Node via Homebrew to ensure no errors
  2. Run npm install -g yo
  3. Terminal doesn't indicate errors and appears successful installation
  4. Yo commands are unsuccessful and 'command not found' is displayed

Steps to reproduce the behavior

Follow Tutorials set out at https://yeoman.io/learning/ or in the github

install yo
npm install --global yo

install a generator
npm install --global generator-webapp

 run it
yo webapp

Command line output

Installation:

npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated readdir-scoped-modules@1.1.0: This functionality has been moved to @npmcli/fs
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs

changed 719 packages in 10s

80 packages are looking for funding
  run npm fund for details

But when checking version or trying to run other yo commands: -bash: yo: command not found

ruyadorno commented 1 year ago

Alternatively, does running npm exec --package=yo --package=generator-webapp -- yo webapp works for you?