Installing Yoeman in a CentOS 7,with the root user, and with the command 'npm install -g yo' I got the following error:

[root@localhost ~]# npm install -g yo
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
/usr/local/bin/yo -> /usr/local/lib/node_modules/yo/lib/cli.js
/usr/local/bin/yo-complete -> /usr/local/lib/node_modules/yo/lib/completion/index.js
yo@3.1.0 postinstall /usr/local/lib/node_modules/yoyodoctor
Yeoman Doctor
Running sanity checks on your system
✔ No .bowerrc file in home directory
✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ No .yo-rc.json file in home directory
✔ Node.js version
✔ npm version{ Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATHat Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn yo',
path: 'yo',
spawnargs: [ '--version' ],
cmd: 'yo --version' }
✖ yo version
{ Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATHat Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn yo',
path: 'yo',
spawnargs: [ '--version' ],
cmd: 'yo --version' }
Found potential issues on your machine :(
yo@3.1.0
updated 1 package in 81.731s

Really the execution has been correct but it has two problems:

  1. /usr/local/bin/yo and /usr/local/bin/yo-complete has no link to the path /usr/bin referenced in PATH environment variable
  2. If we execute /usr/local/bin/ I verify that permissions to the /root/.config/configstore folder are missing and the /root/.config/insight-nodejs folder does not exist

I solved this error with the following actions::

· Create the insight-nodejs folder inside /root/.config (if it doesn't exist, it was my case)

· Assign required permissions:

chmod g + rwx -R /root/.config/configstore /root/.config/insight-nodejs

· Create the links:

ln -s /usr/local/bin/yo /usr/bin/yo
ln -s /usr/local/bin/yo-complete /usr/bin/yo-complete

Once this is done install Yeoman (me) again with 'npm install -g yo' and certify that Yeoman doctor does not report any errors.


And it is verified that the 'yo --version' command does not return any errors.


Origin imagen: Photo on yeoman.io