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 -
@robi said in cannot install Directus CLI:
@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.
Andy -
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-cli
on 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.
-
is this solved
-
I am not sure what there was to solve. @Jeyakumarrathnaselvi what is your issue?
-
I get this error
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 guess you want to use directus CLI on the client ? https://docs.directus.io/self-hosted/cli.html#client ?If so, this can be installed on your PC/laptop and not on the server.
-
No I am trying to install agency OS functionalities on directus setup as per following. https://github.com/directus-labs/agency-os using
npx directus-template-cli@latest apply
but throwing error I mentioned
-
I don't think agency OS will work on the existing Cloudron package. We have to make a new package, maybe. As a disclaimer, I don't have much clue about agency OS. This is just my guess.
-
@girish said in cannot install Directus CLI:
I don't think agency OS will work on the existing Cloudron package. We have to make a new package, maybe. As a disclaimer, I don't have much clue about agency OS. This is just my guess.
Well, it's an app built WITH Directus, thus in theory it should work otherwise then what would be the other limits to using Directus on Cloudron?
-
I've confirmed the latest version works without issue, following the steps I've outlined before.
Essentially, Directus installed on Cloudron and hosting the frontend on another platform like Vercel (free plan).
You need to install the Directus CLI on your local computer, edit the .env file with your Directus "Service Account" and you can deploy this solution.
To be honest, based on it working, I would say another package with AgencyOS wouldn't be worthwhile once you get it deployed.