When installing the vue starter template as site and then adding DaisyUI, i get the error sh: vite: Permission denied.
I also got this issue (with a fresh template again) after installing PrimeVue, which apparently exceeds the upload size so i had to uninstall it again. After uninstalling and pushing, i get the error.
Deleting the node modules folder fixes it, however the starter has a gitignore which ignores the node_modules folder, so the appwrite cli seems to ignore it and upload it anyway
could you share the version of the CLI your using ? since your selfhosted it shouldn't be the latest version but 17 for the CLI (https://appwrite.io/docs/advanced/self-hosting/installation#sdk-version-compatibility).
Also when using the CLI to push a function the CLI will check :
- your .env, and exclude everything from there
- the appwrite.config.json (or appwrite.json) exclude propery
- default appwrite CLI exclude (tho idk if there is the node_modules inside)
When you push the process is like that :
- the CLI bundle the source part of the function (usualy same as the git repository) into a tgz
- it send the tgz to appwrite, then build in appwrite
- and if the build success, it deploy it (if you have set the --activate)
And since it's permission related, are the projects file using specific permissions that maybe the user inside the build process can't use ? (if you dev on windows, it shouldn't be relevent)
Yes, appwrite cli version is 17. I made the mistake of updating and it was really hard to figure out which version i can use with my selfhosted version. Did the feature only come with a later version?
- The env file only contains project name, id and endpoint
- The appwrite config json does not have an exclude property
- .gitignore exists but i am using a template NOT currently connected to a repository
- i am on windows.
When pushing the site, the cli claims its using ignores from the .gitignore file, which clearly isnt the case (and also explains why i had the size limit exceeded).
Deleting my node modules folder works just fine. Its not getting pushed and used in the build process (but recreated, as it should). However deleting my node modules folder every time i want to push an update is .. a really bad experience.
mb i meant .gitignore not .env sorry (i was working on a .env at work and wrongly wrote .env here)
also idk if the cli differ if it is in a git repo or not for the .gitignore
maybe either try to add the appwrite.config.json property to exclude the folder or to git init to load a git repo in local and see if the node_modules is ignored
i remember having some issues with file/folder copy (as i build on CI and just send the builded to appwrite), i needed to remove the dist folder from the gitignore for it to send it
when searching for the exact config key/docs, i came across this
And given that the cli shows me that it should use the gitignore, i am wondering if there is another issue
and i would prefer using the gitignore file to have everything in one place
And initializing git sadly doesnt make a difference
Just checked the cli code and what the cli outputs is just visually. It doesnt mean the cli is actually going through it
sites2.map(async (site) => {
let response = {};
const ignore3 = site.ignore ? "appwrite.config.json" : ".gitignore";
let siteExists = false;
let deploymentCreated = false;
const updaterRow = new Spinner({
status: "",
resource: site.name,
id: site["$id"],
end: `Ignoring using: ${ignore3}`
});
ye it's only the UI part, tho :
- the push use
pushDeployment: https://github.com/appwrite/sdk-for-cli/blob/448f4bcc2b9f8e24766581d23d3a5ea0bf88d8e2/lib/commands/push.ts#L1405 - that
pushDeploymentusepackageDirectory: https://github.com/appwrite/sdk-for-cli/blob/master/lib/commands/utils/deployment.ts#L671 - that
packageDirectoryuselistDeployableFiles: https://github.com/appwrite/sdk-for-cli/blob/master/lib/commands/utils/deployment.ts#L508 - finally
listDeployableFilesuse an ignorer to ignore files : https://github.com/appwrite/sdk-for-cli/blob/master/lib/commands/utils/deployment.ts#L402
looking at : path.join(dirPath, baseDir, ".gitignore");
it looks like it load the .gitignore in the function code itself, not the root repo directory
Well, the vue site template comes with a gitignore and thats what makes sense and should be used from a user perspective.
Your last sentence is talking about functions, but what about sites?
should be the same, it's both deployments
looking at the vue starter, the site is directly on the root folder, which is why it works. (also if you deploy from the console, iirc it directly use the repo as the base)
but for cli deployments, it use the root path + the base path from the appwrite.config.json it seams
also the way appwrite want users to use the appwrite.config.json is basicly one config file, and then it's a monorepo with all your functions in a functions folder, and all your sites in a sites folder, and the rest in the config itself (like database, tables, columns, ...)
./
|- functions/
|- |- my-function/
|- |- other-function/
|- sites/
|- |- my-site/
|- appwrite.config.json
but it's also possible to do it directly on the root project using "path": "." in the appwrite.config.json
for example my nextjs config is like that :
Recommended threads
- [SOLVED] Error upgrading from 1.8.1 to 1...
DO Self-hosted server failed to upgrade with this error "Error response from daemon: client version 1.52 is too new. Maximum supported API version is 1.42". U...
- MariaDB refuses to connect to appwrite
Earlier, I tried updating my Appwrite version from 18.1.x to the latest release because my Flutter package required it to function properly. I used the official...
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...