Skip to content
Accueil » Salesforce: Command ‘SFDX: Create Project’ resulted in an error

Salesforce: Command ‘SFDX: Create Project’ resulted in an error

This error appears in Visual Studio Code when you use the CTRL + SHIFT + P — SFDX: Create Project.

Sometimes, using VS Code results in a headache if you get an error like: Command ‘SFDX: Create Project’ resulted in an error command ‘sfdx.force.project.create’ not found.

Even if you have followed the tutorial to use VS Code with SFDX on Salesforce, you may encounter this type of problem.

Troubleshoot Command ‘SFDX: Create Project’ resulted in an error

command 'sfdx.force.project.create' not found

This error is quite difficult to understand especially if you have a brand new install. If you get this type of error, first make sure that:

And if you have verified everything and everything is ok, go to the next chapter 😉

Check the Visual Studio Code logs

For this error, it’s hard to understand what’s going on, so we need to check some Visual Studio Code logs.

First, we can see that there is nothing in the Salesforce CLI output:

VS Code output terminal

So, we need to open the developer tools.
Click on Help -> Toggle Developer Tools

VS Code Toggle Developer Tools

This will open the DevTools on the right side. Check the logs in the console:

VS Code Developer tool console

Here we can see that there are some errors: “extension ‘salesforce.salesforcedx-vscode-apex’ failed: EACCES: permission denied”

If I check the rights of the sfdx folder, I can see that the folder owner is not the good one, it’s root instead sylvain:

bash console: check sfdx permission folder

I just need to change the folder owner with a chown:

bash console: change the owner of the sfdx folder

Restart the Visual Studio Code application and try again the SFDX: Create project and you can see that it’s now working like a charm 🙂

SFDX: Create project works again!

Leave a Reply

Your email address will not be published. Required fields are marked *