Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Directus
  3. How to install JWT in Directus - getting error

How to install JWT in Directus - getting error

Scheduled Pinned Locked Moved Directus
12 Posts 5 Posters 4.2k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JeyakumarrathnaselviJ Offline
    JeyakumarrathnaselviJ Offline
    Jeyakumarrathnaselvi
    wrote on last edited by
    #1

    I am trying to embed metabase dashboard to directus

    need to install JWT but below command throwing me an error

    $ npm install jsonwebtoken

    1d5a163c-66b7-443c-a3b0-bf5c95710253-image.png

    can someone help how to install it through a terminal

    BrutalBirdieB 1 Reply Last reply
    0
    • JeyakumarrathnaselviJ Jeyakumarrathnaselvi

      I am trying to embed metabase dashboard to directus

      need to install JWT but below command throwing me an error

      $ npm install jsonwebtoken

      1d5a163c-66b7-443c-a3b0-bf5c95710253-image.png

      can someone help how to install it through a terminal

      BrutalBirdieB Offline
      BrutalBirdieB Offline
      BrutalBirdie
      Partner
      wrote on last edited by
      #2

      @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:

      https://github.com/directus/directus/discussions/15615


      One option for testing, although not persistent.
      Start the app in recovery mode and install all you need.
      Then start the app via /app/pkg/start.sh

      https://git.cloudron.io/cloudron/directus-app/-/blob/master/Dockerfile#L13

      Like my work? Consider donating a drink. Cheers!

      BrutalBirdieB 1 Reply Last reply
      0
      • BrutalBirdieB BrutalBirdie

        @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:

        https://github.com/directus/directus/discussions/15615


        One option for testing, although not persistent.
        Start the app in recovery mode and install all you need.
        Then start the app via /app/pkg/start.sh

        https://git.cloudron.io/cloudron/directus-app/-/blob/master/Dockerfile#L13

        BrutalBirdieB Offline
        BrutalBirdieB Offline
        BrutalBirdie
        Partner
        wrote on last edited by
        #3

        @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 😉

        Like my work? Consider donating a drink. Cheers!

        1 Reply Last reply
        0
        • JeyakumarrathnaselviJ Offline
          JeyakumarrathnaselviJ Offline
          Jeyakumarrathnaselvi
          wrote on last edited by
          #4

          @BrutalBirdie I tried but it is not allowing me to install it

          girishG 1 Reply Last reply
          0
          • girishG girish moved this topic from Support on
          • JeyakumarrathnaselviJ Jeyakumarrathnaselvi

            @BrutalBirdie I tried but it is not allowing me to install it

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            @Jeyakumarrathnaselvi Are you having to install new npm modules because you are developing some directus plugin/extension?

            JeyakumarrathnaselviJ 1 Reply Last reply
            0
            • girishG girish

              @Jeyakumarrathnaselvi Are you having to install new npm modules because you are developing some directus plugin/extension?

              JeyakumarrathnaselviJ Offline
              JeyakumarrathnaselviJ Offline
              Jeyakumarrathnaselvi
              wrote on last edited by
              #6

              @girish Yes but not able install. i tried installing in recovery but after installing. app is crashing

              i need to install jsonwebtoken

              JeyakumarrathnaselviJ 1 Reply Last reply
              0
              • JeyakumarrathnaselviJ Jeyakumarrathnaselvi

                @girish Yes but not able install. i tried installing in recovery but after installing. app is crashing

                i need to install jsonwebtoken

                JeyakumarrathnaselviJ Offline
                JeyakumarrathnaselviJ Offline
                Jeyakumarrathnaselvi
                wrote on last edited by
                #7

                @Jeyakumarrathnaselvi Can someone help

                girishG 1 Reply Last reply
                0
                • JeyakumarrathnaselviJ Jeyakumarrathnaselvi

                  @Jeyakumarrathnaselvi Can someone help

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #8

                  @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.

                  ruihildtR 1 Reply Last reply
                  0
                  • girishG girish

                    @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.

                    ruihildtR Offline
                    ruihildtR Offline
                    ruihildt
                    wrote on last edited by
                    #9

                    @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 install means it's always a system-wide installation?

                    girishG M 2 Replies Last reply
                    0
                    • ruihildtR ruihildt

                      @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 install means it's always a system-wide installation?

                      girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #10

                      @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.

                      1 Reply Last reply
                      0
                      • ruihildtR ruihildt

                        @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 install means it's always a system-wide installation?

                        M Offline
                        M Offline
                        msbt
                        App Dev
                        wrote on last edited by
                        #11

                        @ruihildt I've installed a few extensions from that repo and what I usually do is clone it locally, run npm install and npm run build, this will create a dist folder 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)

                        Happy Hosting & Web Development

                        ruihildtR 1 Reply Last reply
                        2
                        • M msbt

                          @ruihildt I've installed a few extensions from that repo and what I usually do is clone it locally, run npm install and npm run build, this will create a dist folder 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)

                          ruihildtR Offline
                          ruihildtR Offline
                          ruihildt
                          wrote on last edited by
                          #12

                          @girish Maybe you could add those steps to the help section?

                          1 Reply Last reply
                          0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Bookmarks
                          • Search