yeoman / doctor

Detect potential issues with users system that could prevent Yeoman from working correctly
http://yeoman.io
BSD 2-Clause "Simplified" License
61 stars 17 forks source link

Doctor complains when installation is not global #52

Open dfee opened 4 years ago

dfee commented 4 years ago

I want to install yeoman in my monorepo project... and wrap it as part of another tool (that registers the package elsewhere in the monorepo). however, this seems to annoy the doctor:

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

Unable to find the npm root, something went wrong.
Try to execute npm -g root --silent on your command-line

✔ No .yo-rc.json file in home directory
✔ Node.js version
✔ npm version
✔ yo version

Found potential issues on your machine :(
npm WARN scaffold@1.0.0 No description
npm WARN scaffold@1.0.0 No repository field.

+ yo@3.1.1
added 684 packages from 392 contributors and audited 4310 packages in 18.171s

19 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Is this verify necessary / useful? Can it be updated to support non-global installs?

https://github.com/yeoman/doctor/blob/df93f8a73e1654f5f91414bd5e5d923b15f7812f/lib/rules/node-path.js#L43-L62

SBoudrias commented 4 years ago

It's useful for most users as it usually point to misconfigurations.

These are just warning, feel free to ignore if you know you have a special setup that is working fine.

mshima commented 4 years ago

@dfee if you are doing some custom lookups, you can consider using yeoman-environment directly. AFAIC yo is a stand-alone cli and yeoman-doctor is an yo utility.