Moderator
and then deployed it, but it could never find Appwrite
Votes
0
Replies
24
Participants
Unknown
Messages
25
Moderator
and then deployed it, but it could never find Appwrite
Moderator
I was unaware there were build commands
Admin
what version of the CLI are you using? appwrite -v
Moderator
I actually upgrade it suspecting that, it said 4.0 was available but I ran brew upgrade appwrite and it seemed to install but didn't seem to change anything, lemme check 2.0.2
Moderator
which is pretty oudated I take it?
Moderator
also I love the new logo
Admin
i don't recommend using brew...there is probably a bug. i recommend installing using NPM
Moderator
copy
Moderator
so after upgrading using NPM (and uninstalling homebrew one) I keep getting an error when I try to do anything after like, 30-45s that just says, "Error: Unexpected 'G'"
Moderator
Moderator
Moderator
4.1.0 now
Moderator
Admin
Were you connecting to cloud?
Moderator
yes
Moderator
@Steven still getting weird errors in Appwrite
Moderator
Moderator
Moderator
export default async ({ req, res, log, error }) => { // Why not try the Appwrite SDK? // const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') .setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID) .setKey(process.env.APPWRITE_API_KEY); const database = new Databases(client); log("Hello, Logs!"); error("Hello, Errors!"); // The `req` object contains the request data // `res.json()` sends a JSON object back to the client try { log("Request Body: ", JSON.stringify(req.body)); const user = await database.getDocument("maindb", "members", req.body); return res.json(user); } catch (error) { error(`Error Caught: ${JSON.stringify(error)}`); return res.json({ error: error.message }); }
};Moderator
oh
Moderator
duh
Admin
was this a function from before 1.4?
Admin
oh right error is being overridden
Moderator
yeah I'll make it solved
Moderator
[SOLVED] New Functions (node-18.0) Cannot Find package node-appwrite