and then deployed it, but it could never find Appwrite
I was unaware there were build commands
what version of the CLI are you using? appwrite -v
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
which is pretty oudated I take it?
also I love the new logo
i don't recommend using brew...there is probably a bug. i recommend installing using NPM
copy
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'"
4.1.0 now
Were you connecting to cloud?
yes
@Steven still getting weird errors in Appwrite
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 });
}
};
oh
duh
was this a function from before 1.4?
oh right error is being overridden
yeah I'll make it solved
[SOLVED] New Functions (node-18.0) Cannot Find package node-appwrite
Recommended threads
- Appwrite console is too heavy
The Appwrite console is too heavy And all of my services broken Any support , please
- router_deployment_not_found
I updated my function a few times and now i am getting the error: router_deployment_not_found I even reverted back to my original code but i am still getting th...
- Cloud function deploy stucks in processi...
Been trying for the last hours to deploy my function but for whatever reason, alwasy stuck on processing!