Back

Appwrite-CLI functions deploy not working

  • 0
  • Functions
rohit90314
8 Jul, 2023, 12:59

Hi Folks, I am trying to deploy a functions directly from my local machine using the appwrite cli.

Am I doing something wrong 😄

TL;DR
Title: Issue with Appwrite-CLI functions deploy Messages: User is experiencing issues with deploying functions using the Appwrite-CLI. They are unsure if they are doing something wrong. They tried different commands and versions of the CLI but still encountered errors. User is open to suggestions on how to improve their usage of the CLI. Solution: The user is recommended to follow the steps mentioned by another user in the thread: 1. Create a new function with a name and ID. 2. Run the command "appwrite init function" to initialize the function. 3. Navigate into the created folder using the "cd" command. 4.
D5
8 Jul, 2023, 13:16

I recommend creating the function and everything with the cli way

D5
8 Jul, 2023, 13:16

First create a folder

D5
8 Jul, 2023, 13:17

Open it in your command line

D5
8 Jul, 2023, 13:17

(using cd command)

D5
8 Jul, 2023, 13:34

Once you're in the folder, run appwrite init project

D5
8 Jul, 2023, 13:34

Then appwrite init function

D5
8 Jul, 2023, 13:34

Create a new function with a name and ID

rohit90314
8 Jul, 2023, 13:38

Yeah I can try that ( Anyways I am not blocked, I used the manual way for now to get started). I created this thread to understand what’s wrong here, is it something with the cli in general or the params being passed. If so then there’s scope to improve docs or create awareness on how to use cli.

Nevus
8 Jul, 2023, 13:39

Is there a space after the comma? Spaces cause problems on linux, not sure about powershell

rohit90314
8 Jul, 2023, 13:39

I just copied the command from the UI (and its in PS)

rohit90314
8 Jul, 2023, 13:39

I don’t think there’s any space there

D5
8 Jul, 2023, 13:41

Not sure, but anyways, I recommend going through the CLI way I mentioned. Forgot to say that after following the aforementioned steps, you get a folder with a function template. You just modify it and write the appwrite deploy function Command

Nevus
8 Jul, 2023, 13:44

Is there a reason why you are using older version of appwrite cli? The latest version should be 2.0.2

rohit90314
8 Jul, 2023, 13:46

I was using that only, it didn’t work so I went to appwrite cli npm registry there I saw that version and I downgraded thinking the docs are per old cli😅

Nevus
8 Jul, 2023, 13:47

createDeployment command might not have existed in 0.x. Thats 2 major versions behind!

rohit90314
8 Jul, 2023, 13:47

I can post the error after updating the package again

rohit90314
8 Jul, 2023, 13:48

But as far as I remember it was exact same error

Nevus
8 Jul, 2023, 13:51

Where is the third screenshot from? That seems to need correction 😄

rohit90314
8 Jul, 2023, 13:52

Npm resgistry😅

Nevus
8 Jul, 2023, 13:59

ahh its the docs for 0.17

rohit90314
8 Jul, 2023, 13:59
Nevus
8 Jul, 2023, 14:00

Could you try putting it all in a single line without the comma

D5
8 Jul, 2023, 15:23

As said, I think if you create a function by the way I mentioned, you will have 0 problems with current and future functions

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