All was working fine till the morning untill, in the afternoon when i tried to run some create LWC commands. Now, no SFDX commands will work, i am getting the following error :
04:30:38.633 sfdx force:lightning:component:create --componentname myComponent2 --outputdir force-app/main/default/aura
ERROR running force:lightning:component:create: Command failed with ENOENT: npm root -g --prefix /Users/padmajasubhash/Documents/SFDX Projects/Surya Practice/.yo-repository --loglevel error
spawnSync npm ENOENT
04:30:39.881 sfdx force:lightning:component:create --componentname myComponent2 --outputdir force-app/main/default/aura
ended with exit code 1
Please help.
.yo-repository
folder in/Users/padmajasubhash/Documents/SFDX Projects/Surya Practice
. That might fix it, though it doesn't fix the initial problem