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
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...