cannot install Directus CLI
I'm trying to install AgencyOS on my Directus instance.
I need to isntall the CLI:
# npx directus-template-cli@latest apply
Only, I get the following err without it going any further.
npm ERR! code EROFS npm ERR! syscall open npm ERR! path /root/.npm/_cacache/tmp/198c5497 npm ERR! errno -30 npm ERR! rofs EROFS: read-only file system, open '/root/.npm/_cacache/tmp/198c5497' npm ERR! rofs Often virtualized file systems, or other file systems npm ERR! rofs that don't support symlinks, give this error. npm ERR! Log files were not written due to an error writing to the directory: /root/.npm/_logs npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
I see some apparently have been able to run Directus CLI, so something may have changed recently? They've very active in dev in 2023.
Directus v. 10.8.2
@micmc set the HOME env var to /app/data before the install
Thanks for the clue, however I've tried a few things in that sense in /app/data/env.sh and I still get the same error message trying to install the CLI, and even, when I look at the available variables I cannot even see a HOME reference to try. Maybe you could be more specific in how to set it here, I know it's something in the like, I just can't seem to figure it out. Still looking thanks for your help bud.
The cli would have to be installed in the package just like any other node module as such. From https://www.npmjs.com/package/directus-template-cli it seems that this is still some proof of concept code with various side-effects. So not sure if we want to include this in the package. Since I haven't properly used directus, I am also not sure what exactly those templates in the context of directus are and for the actual AgencyOS it looks like a whole separate app package if we want to have that.
@micmc I worked through this and got everything working in the past. I had to install the
directus-clion my local machine and use something like Visual Studio Code or similar program to connect to my Directus instance hosted inside Cloudron, to run the AgencyOS importer.
Separate from that, I forked the "AgencyOS" code base to a private Github repo and published using Vercel for the frontend.
Based on my experience, because anything outside of
/app/data/on Cloudron is read only, I had to break apart the AgencyOS frontend and then just connect back to Directus.
I'd be aware, AgencyOS is still under active development and it was created as more of a proof of concept, so in my experience you're bound have quite a few issues. But I got it working in the past, but take lots and lots of backups for both the frontend and your directus instance.