Currently, spfx doctor detects SPFx version using npm which looks into node_modules installed in the working director. If npm doesn't return any results, spfx doctor assumes there's no SPFx project and looks for the global SPFx version instead. This can lead to confusing results when you run spfx doctor in an SPFx project that doesn't have dependencies restored yet. We should reconsider how we detect local dependencies and more clearly communicate what we're doing to avoid confusing users.
Currently,
spfx doctordetects SPFx version using npm which looks into node_modules installed in the working director. If npm doesn't return any results,spfx doctorassumes there's no SPFx project and looks for the global SPFx version instead. This can lead to confusing results when you runspfx doctorin an SPFx project that doesn't have dependencies restored yet. We should reconsider how we detect local dependencies and more clearly communicate what we're doing to avoid confusing users.