Description
I was getting more and more people reporting this issue when they were trying to resolve their issues with SPFx projects and always assumed it was their environment, but now I'm able to reproduce the issue consistently.
When running SPFx doctor within a solution folder or at the "global" level, the results are invariably:
CLI for Microsoft 365 SharePoint Framework doctor
Verifying configuration of your system for working with the SharePoint Framework
Error: npm not found
Steps to reproduce
- From within a solution folder, run
m365 spfx doctor
- Get the error message
- From outside a solution folder, run the same command
- Get the error message
- Running
npm -v immediately after the error message returns the npm version, as expected.
Expected result
Should get a report on the solution or the environment.
Actual result
Get Error: npm not found
Environment
- node 8x, 10x, 12x
- m365 cli v.3.7.0
Description
I was getting more and more people reporting this issue when they were trying to resolve their issues with SPFx projects and always assumed it was their environment, but now I'm able to reproduce the issue consistently.
When running SPFx doctor within a solution folder or at the "global" level, the results are invariably:
Steps to reproduce
m365 spfx doctornpm -vimmediately after the error message returns the npm version, as expected.Expected result
Should get a report on the solution or the environment.
Actual result
Get
Error: npm not foundEnvironment