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 permissions
In my app I have a CreateUser flow which makes several documents and at the end uses the functions.createExecution() to call a server-side function to create a ...
- The file size is either not valid or exc...
Hello, I am receiving the following error when I am trying to deploy a function from my local. ``` > appwrite push functions --function-id xxxxxxxxx ℹ Info: Va...
- How does sending email from the Appwrite...
I noticed that the pricing page mentions “Messages – 1000 per month” for the Free plan. Is this different from sending emails? When I try to send an email usin...