salesforcedx-vscode icon indicating copy to clipboard operation
salesforcedx-vscode copied to clipboard

Getting Error: Command 'SFDX: Create Project' resulted in an error (command 'sfdx.force.project.create' not found)

Open paolinAGE opened this issue 3 years ago • 20 comments

Summary

In VS Code I'm getting this error Command 'SFDX: Create Project' resulted in an error (command 'sfdx.force.project.create' not found). I ran sfdx update from CMD and it says I'm up to date. I am able to create project directly via CMD but not via VSCode and unable to run any other SFDX commands in VSCode but I was able to 1 day ago). I've tried reinstalling VsCode and the Salesforce extensions and rebooted my laptop, but nothing changed. I still get the same error.

Steps To Reproduce:

    1. Open VS Code
    1. Type Ctrl-Ship-P, then start typing SFDX and select SFDX: Create Project
    1. then I get error message

Expected result

It should have taken me to the next step and let me put in my project name.

Actual result

Error message is already indicated

Additional information

Screen Shot 2022-03-09 at 5 24 20 PM

Salesforce Extension Version in VS Code: v54.4.0

SFDX CLI Version: already on latest version: 7.141.1-4a1340e

OS and version: I'm on Mac OS Monterey 12.2.1.

paolinAGE avatar Mar 10 '22 01:03 paolinAGE

I'm having the same issue. In addition, if I open an existing project, it seems like the extension doesn't recognize that I'm in a Salesforce project directory -- the only SFDX commands that show up in the command palette are those related to creating a new project (and those don't work). I've updated SFDX via command line, uninstalled and reinstalled the extensions, and re-installed VS Code but no change. This broke sometime in the last few weeks.

Salesforce Extension Version in VS Code: v 54.4.0

SFDX CLI Version: 7.141.1

OS and version: Mac OS v 12.2.1 (on an M1 Mac)

mcculloughcm avatar Mar 10 '22 01:03 mcculloughcm

Same for me.

paolinAGE avatar Mar 10 '22 01:03 paolinAGE

I'm experiencing the same issue as well.

michaeltookes avatar Mar 10 '22 02:03 michaeltookes

@paolinAGE , I just ran through this, and it worked for me. I have a few questions for you...

  1. When I run the "SFDX: Create Project" command, a popup menu appears with 3 choices: Standard, Empty, and Analytics. Do you see this? Or are you getting the "command 'sfdx.force.project.create' not found" error here, before this popup menu even appears?

  2. Please run the following, and let us know what results you get:

sfdx --version

(I get sfdx-cli/7.141.1 darwin-x64 node-v16.14.0)

and also run sfdx plugins

  1. Could you please attach the log file.

  2. In the log file, if you see the error, "Error: Could not locate the bindings file", this sounds like the same issue reported here (https://github.com/forcedotcom/salesforcedx-vscode/issues/3901). If this is the case, this is something we're looking into, and a temporary fix is to change "Salesforce CLI Integration" to v54.3.0.

jeffb-sfdc avatar Mar 10 '22 02:03 jeffb-sfdc

I'm facing the same issue.

VineshShampoor avatar Mar 10 '22 03:03 VineshShampoor

@paolinAGE , I just ran through this, and it worked for me. I have a few questions for you...

  1. When I run the "SFDX: Create Project" command, a popup menu appears with 3 choices: Standard, Empty, and Analytics. Do you see this? Or are you getting the "command 'sfdx.force.project.create' not found" error here, before this popup menu even appears?

No popup menu, just the error message.

  1. Please run the following, and let us know what results you get:

sfdx --version

(I get sfdx-cli/7.141.1 darwin-x64 node-v16.14.0)

I get 'sfdx-cli/7.141.1 darwin-x64 node-v16.14.0'

and also run sfdx plugins

I get 'no plugins installed'

  1. Could you please attach the log file.

Please see attached log file below.

  1. In the log file, if you see the error, "Error: Could not locate the bindings file", this sounds like the same issue reported here (Extension fails to locate the bindings file #3901). If this is the case, this is something we're looking into, and a temporary fix is to change "Salesforce CLI Integration" to v54.3.0.

paolinAGE avatar Mar 10 '22 04:03 paolinAGE

I found the log file and yes, I see the error: could not locate the bindings file. exthost.log

paolinAGE avatar Mar 10 '22 04:03 paolinAGE

I have also had this error. But I fixed it by downgrading the VS code extension.It's working fine now.

yasaratcoding avatar Mar 10 '22 07:03 yasaratcoding

I am getting the same error. Command-line is fine.

Machine/Chip - Apple M1 Pro Monterey - 12.1 (21C52)

Salesforce Extension Pack - 54.4 VS Code - Version: 1.65.1 Commit: 8908a9ca0f221f36507231afb39d2d8d1e182702 Date: 2022-03-08T02:20:04.372Z (2 days ago) Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin arm64 21.2.0

rajpunjabi avatar Mar 10 '22 07:03 rajpunjabi

downgrading Salesforce CLI Integration VS Code Extension by one version(from 54.4.0 to 54.3.0) will fix this. image

VineshShampoor avatar Mar 10 '22 07:03 VineshShampoor

Having the same issue. It seems like it didn't recognize any SFDX Project at all anymore, neither new ones nor existing ones.

Apple M1 Pro, Monterey 12.1

dschibster avatar Mar 10 '22 07:03 dschibster

downgrading Salesforce CLI Integration VS Code Extension by one version(from 54.4.0 to 54.3.0) will fix this. image

Same for me. 53 is workiing.

rajpunjabi avatar Mar 10 '22 08:03 rajpunjabi

Hi, Same for me after downgrading it is working now. Thanks for the follow up Who can we contact for that?

ashrafbaker avatar Mar 10 '22 10:03 ashrafbaker

You guys also have to rollback your Apex extension version as well. Apex language server is also not working in the latest version.

omerfarukozdemir avatar Mar 10 '22 14:03 omerfarukozdemir

I'm experiencing the same issue.

jwalke avatar Mar 10 '22 14:03 jwalke

Hi everyone! Thanks for reporting this and sorry about the issues you're facing. This is due to a known problem with the latest release of the Salesforce Extensions v54.4.0. This issue is being tracked by #3901 and the team is working on a fix. In the meantime, please downgrade to version v54.3.0 - let us know if you see any other issues or have any questions!

AnanyaJha avatar Mar 10 '22 17:03 AnanyaJha

I've written an article regarding this problem. You basically need to open the developer logs to understand what's going on. For me, it was a problem of right of the .sfdx project

https://www.black-fox.org/sfdx-salesforce-cli/command-sfdx-create-project-resulted-in-an-error/

syenoussa avatar May 31 '23 21:05 syenoussa

Same issue whether or not I downgraded. I successfully created a project in the command line using this command: sf project generate --name MyProject

from https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_create_new.htm

RBurrage avatar Jan 16 '24 19:01 RBurrage

same issue, but successfully created the project with the command sf project generate --name MyProject.

SnehaPawar22 avatar Jan 20 '24 09:01 SnehaPawar22

same issue, unable to create/deploy project

sindhusreeaita avatar Jan 23 '24 18:01 sindhusreeaita

Has anyone received this error message after creating the project "Unable to activate the Apex Language Server - Running java command C:\Program Files\Common Files\Oracle\Java\bin\java -XshowSettings:properties -version failed with error: spawn C:\Program Files\Common Files\Oracle\Java\bin\java ENOENT", please let me know.

VigneshIyer11888 avatar Jul 24 '24 19:07 VigneshIyer11888

hi @RBurrage , @SnehaPawar22, @sindhusreeaita and @VigneshIyer11888. Is SFDX: Create Project command from command palette with latest version of the extensions (v61.8.1) still causing you errors? If it's not and you're having a different problem, please create a new issue. I'll be closing this as there have been no recent reports of SFDX: Create Project command failing and I was not able to reproduce it.

CristiCanizales avatar Aug 16 '24 18:08 CristiCanizales