I have created salesforce functions and created compute environment .But it is giving me the below error when i try to deploy my functions

Pushing changes to functions... failed » Error: Invalid project.toml - File Not Found: ENOENT: no such file or directory, open 'C:\Users\XXXX\XXXX\Documents\VS » CODE\FUNCTIONS4\functions.git\project.toml' Are you in the correct working directory?

  • @Julián Duque Can you please help me on this
    – sfdcudhay
    Apr 11, 2022 at 7:05
  • I feel there should be a way to change the directory so that it can find correct project.toml but currently I'm stuck here too
    – compski
    Apr 6, 2023 at 13:37

2 Answers 2


I had the same problem when I copied one function from one project to another. When you create a functions its generate the project.toml automaticaly, In my case y lost the file in the copy. try to generate the function again and merge you code. I hope its help


This is because you also created a .git folder inside your function.

There should only be 1 .git folder at <functionsTrialOrg> (which I assume is your FUNCTIONS4 org.

So how to resolve this?

In your VS Code terminal, navigate to C:\Users\XXXX\XXXX\Documents\VS » CODE\FUNCTIONS4\functions then type the command below :

rm -rf .git

to delete that .git folder.

Then navigate back to C:\Users\XXXX\XXXX\Documents\VS » CODE\FUNCTIONS4 and then run

sf deploy functions -o <devhubaliasname>

You can find the DevHub alias name by sfdx alias list

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .