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
John L Schneider IIJohn L Schneider II 

Cannot create new project in SFDX

My apologies if this is a stupid question, but I have tried and tried and cannot figure out what is going wrong here.  I am used to using Eclipse all the time but am trying to make the switch to SFDX, however.....I'm stuck fairly early.

This is the command I'm using
sfdx force:project:create --projectname fsc --outputdir c:\Users\johns\Desktop\Temporary_Deletes_Daily --template standard
This is the error I am getting.
Error: Unrecognized flag: {"name":"projectname","char":"n","required":true,"description":"name of the generated project","longDescription":"The name for the new project. Any valid folder name is accepted.","type":"string","values":[]}
    at flags.forEach.flag (C:/Program Files/Salesforce CLI/client/node_modules/force-language-services/dist/common/main/LegacyCommand.js:77:31)
    at Array.forEach (<anonymous>)
    at Function.toFlagsConfig (C:/Program Files/Salesforce CLI/client/node_modules/force-language-services/dist/common/main/LegacyCommand.js:28:19)
    at Object.<anonymous> (C:/Program Files/Salesforce CLI/client/node_modules/force-language-services/dist/oclif/force/project/create.js:31:66)
    at Module._compile (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at LazyLoader.loadModule (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:139:21)
    at Function._load (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:115:29)
    at require (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at fetch (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:101:21)
    at Plugin.findCommand (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:115:21)
    at Object.load (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:48:72)

10:46:07.528 sfdx force:project:create --projectname fsc --outputdir c:\Users\johns\Desktop\Temporary_Deletes_Daily --template standard ended with exit code 1

 
Alain CabonAlain Cabon
@John L Schneider II

The command line is fully correct but it is your installation of sfdx that should be incorrect.

For windows, I prefer the installation "bis": node js + npm sfdx than the CLI exe that seems "easier" at first (but many problems afterwards).

First, uninstall the Salesforce CLI on Windows if you used the .exe file.

then Install the CLI with npm :  https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm

Ensure that the long-term support (Active LTS) version of Node.js is installed on your computer.
  1. To install the LTS version, go to https://nodejs.org/en/download/  (https://nodejs.org/en/download/ ) . To check your version number, run: node --version
  2. Run this command.: npm install sfdx-cli --global

You will have an installation more stable, complete and sufficient for sfdx
You have already node js probably but it is the installation done by the SF CLI .exe.
 
Ajay K DubediAjay K Dubedi
Hi John,

You should install first this CLI Package in your  VS code IDE 

1. Salesforce CLI Integration (https://developer.salesforce.com/tools/sfdxcli)
2. Salesforce extension

Now you can create a new project with VS code and use its command

For more information refer: https://www.youtube.com/watch?v=7qR0c8h5cCU

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks,
Ajay Dubedi