function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alexandra Stehman 10Alexandra Stehman 10 

VSCode cannot create new project: npm is not recognized

I got a new laptop and am trying to set up VSCode. I had installed SF CLI. I have java version 11.0.7. VSCode installed and I installed the SF Extension pack on it.

However, whenever I attempt to create a new project, I am getting this error:
'npm' is not recognized as an internal or external command,
operable program or batch file.
16:02:49.762 sfdx force:project:create --projectname test --outputdir c:\Users\Alexandra Stehman\Documents\Projects\CLM Internal\VSCode\Simplus Internal CLM - full Sandbox --template standard
 ended with exit code 1
Any ideas?

Thank you!

 
VinayVinay (Salesforce Developers) 
Hi Alexandra,

Update Salesforce CLI to the latest version.

Issue seems to be configuration of environment variables in you system.

Review below links which will help you.

https://salesforce.stackexchange.com/questions/304554/npm-is-not-recognized-as-an-internal-or-external-command-vs-code-salesforc
https://salesforce.stackexchange.com/questions/163795/sfdx-is-not-recognized-as-an-internal-or-external-commandhttps://developer.salesforce.com/forums/?id=9062I000000IEleQAG
https://salesforce.stackexchange.com/questions/238917/salesforce-cli-is-not-installed-it-aint-so

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar