
I get the following error when trying to create a function using the appwrite CLI(4.0.0)
$ appwrite init function
? What would you like to name your function? test
? What ID would you like to have for your function? unique()
? What runtime would you like to use? Node.js (node-18.0)
β Error Command failed: cmd /c "git clone -b v3 --single-branch --depth 1 --sparse https://github.com/appwrite/functions-starter ."
error: unknown option `sparse'
usage: git clone [<options>] [--] <repo> [<dir>]
...
Suggestion: Try updating your git to the latest version, then trying to run this command again.
The function is still created in the appwrite console, but nothing is added to the appwrite.json and no files are added to functions/test
.
Now, im not actually interested in automatic deployment with git, since i already have a deployment pipeline setup. However, it seems that git deployment is being forced since the new update? When i create functions through the appwrite console, i'm forced to connect to git. So is that just how it is now? Or can i avoid this whole git deployment procedure, either in the console or using the CLI.

The function you've created it is indeed local one and connected to git, Appwrite uses git
to get the starter code for your function

What version of git
you have?

git --version

git version 2.24.0.windows.2

Ah i see, its trying to fetch the starter-function code from github appwrite.

Can you upgrade to latest one (42) and try again

That worked π Thats my bad, i thought the git error was because the function was trying to force the function into appwrite's automatic git deployment, like the console does. Thanks for your help

<:appwritefire:823999000330895380>

[SOLVED] Git error on CLI function creation
Recommended threads
- Function running in cloud but not locall...
Hi everyone, I have an appwrite function which is on python3.12 runtime. I have a library (hnswlib) which builds wheels during installation. This works on appwr...
- Permissions for bulk operation
Hi team, I have a question: βIn the databases.createDocuments bulk API, can I set document-level permissions? If yes, how exactly should I include the permissio...
- Limit File Upload count?
Is there a way to limit the number of files a user can upload? I know there's a limit of file size but in my case I'd like to limit the user to only upload x am...
