Back

[SOLVED] appwrite init function fails

  • 1
  • Flutter
  • Functions
Ipsoka
27 Mar, 2023, 19:31

When doing appwrite init function im getting the following:

βœ— Error Command failed: git clone --depth 1 --sparse https://github.com/appwrite/functions-starter . Cloning into '.'... fatal: cannot change to 'https://github.com/appwrite/functions-starter': No such file or directory
error: failed to initialize sparse-checkout

any ideas why this is happening?

Input:

? What would you like to name your function? Is Already Registered ? What ID would you like to have for your function? unique() ? What runtime would you like to use? Dart (dart-2.17)

What could be the reason?

TL;DR
The user was experiencing an error with the appwrite init function. They received the error message "error: failed to initialize sparse-checkout" when running the command. It was determined that the issue was caused by an outdated version of git. After upgrading git to the latest version, the problem was resolved. The user was able to successfully run the appwrite init function without any errors.
safwan
27 Mar, 2023, 19:34

is your appwrite CLI up to date?

Ipsoka
27 Mar, 2023, 19:35

1.2.1

safwan
27 Mar, 2023, 19:35

error: failed to initialize sparse-checkout

This error was an issue with a certain version of git i think.

safwan
27 Mar, 2023, 19:37

appwrite projects get --projectId [PROJECT_ID]

can you run this command, and see if it works?

safwan
27 Mar, 2023, 19:37

use the correct projectid

Ipsoka
27 Mar, 2023, 19:40

You are right, my git version is old and rusty, after upgrading it worked! Thanks πŸ˜„

Ipsoka
27 Mar, 2023, 19:40

I was on 2.26.1 and now im on 2.40.0

safwan
27 Mar, 2023, 19:42

That's great πŸ˜„ Glad it worked! Please change the post title to [SOLVED] appwrite init function fails if you can <:appwritecheers:892495536823861258>

Ipsoka
27 Mar, 2023, 19:44

[SOLVED] appwrite init function fails

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more