How to install JWT in Directus - getting error
I am trying to embed metabase dashboard to directus
need to install JWT but below command throwing me an error
$ npm install jsonwebtoken
can someone help how to install it through a terminal
@Jeyakumarrathnaselvi if its not packaged into the app directly you can't do it.
Since the core of the app is read-only.
Would it not work to use the metabase app directly?
I also found your discussion here:
One option for testing, although not persistent.
Start the app in recovery mode and install all you need.
Then start the app via
@BrutalBirdie oh and if you find a way to get it working, document they way you made it working here so some appdev may add your changed persistent
@BrutalBirdie I tried but it is not allowing me to install it
@Jeyakumarrathnaselvi Are you having to install new npm modules because you are developing some directus plugin/extension?
@girish Yes but not able install. i tried installing in recovery but after installing. app is crashing
i need to install jsonwebtoken
@Jeyakumarrathnaselvi Can someone help
@Jeyakumarrathnaselvi I am not sure how this can be solved in Cloudron context. Essentially, the situation here is that we want to add extra code to an app which brings it's own dependencies/libraries.
Where/how does a Directus extension load extra node_modules from? Can it be under the extensions directory or does it have to be installed system wide? If it's latter, I am afraid we are out of luck and this is not possible with Cloudron.
ruihildt last edited by
@girish I was looking into adding extensions for Directus, more specifically this one: https://github.com/dimitrov-adrian/directus-extension-masked-interface
Do you think it will work or does using
npm installmeans it's always a system-wide installation?
@ruihildt Installing extra npm modules doesn't work. I am not sure how we can solve this since the filesystem is readonly. I looked into upstream Directus docker file for some inspiration but it looks like it's abandoned.
@ruihildt I've installed a few extensions from that repo and what I usually do is clone it locally, run
npm run build, this will create a
distfolder with the
index.js-files that you can upload into the correlating extensions-folder via the file manager. Not sure if this applies to this very extension, because the description is missing, but it worked for various others. I just tried it and it installs fine, but I haven't uploaded it (and don't forget to restart Directus, it will tell you which extensions were loaded)
ruihildt last edited by
@girish Maybe you could add those steps to the help section?