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
  • 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 | Demo | Docs | Install
  1. Cloudron Forum
  2. N8N
  3. Not able to use Crypto module

Not able to use Crypto module

Scheduled Pinned Locked Moved Solved N8N
5 Posts 4 Posters 1.1k Views 4 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.
    • MooCloud_MattM Offline
      MooCloud_MattM Offline
      MooCloud_Matt
      wrote on last edited by MooCloud_Matt
      #1

      Hello to all,

      I'm trying a bit N8N, to see the performance on various tasks that now we use some bash or python script to do.

      But I wasn't able to use the Node Crypto function, even when I set the ENV to export NODE_FUNCTION_ALLOW_EXTERNAL=* or
      export NODE_FUNCTION_ALLOW_EXTERNAL=crypto

      I even try with the API to add ENV to the container directly but Nada.

      my test crypt in the Function node is this:

      let crypto;
      const items = [{
          json: {
              "is disable": "yes"
          }
      }]
      try {
          crypto = await import('crypto');
      } catch (err) {
          return items
      }
      

      088dd749-ffb4-4fcb-81d3-2e8694f40fd3-image.png

      I'm not a good JS dev, and my understanding is pretty basic (i live tnx to the debuggers) so is highly possible that is my code doesn't work, but maybe is some weird implementation with the docker container.

      Matteo. R.
      Founder and Tech-Support Manager.
      MooCloud MSP
      Swiss Managed Service Provider

      BrutalBirdieB girishG 2 Replies Last reply
      0
      • MooCloud_MattM MooCloud_Matt

        Hello to all,

        I'm trying a bit N8N, to see the performance on various tasks that now we use some bash or python script to do.

        But I wasn't able to use the Node Crypto function, even when I set the ENV to export NODE_FUNCTION_ALLOW_EXTERNAL=* or
        export NODE_FUNCTION_ALLOW_EXTERNAL=crypto

        I even try with the API to add ENV to the container directly but Nada.

        my test crypt in the Function node is this:

        let crypto;
        const items = [{
            json: {
                "is disable": "yes"
            }
        }]
        try {
            crypto = await import('crypto');
        } catch (err) {
            return items
        }
        

        088dd749-ffb4-4fcb-81d3-2e8694f40fd3-image.png

        I'm not a good JS dev, and my understanding is pretty basic (i live tnx to the debuggers) so is highly possible that is my code doesn't work, but maybe is some weird implementation with the docker container.

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

        @MooCloud_Matt said in Not able to use Crypto module:

        But I wasn't able to use the Node Crypto function, even when I set the ENV to export NODE_FUNCTION_ALLOW_EXTERNAL=* or

        Did you restart the app after setting the env?

        Like my work? Consider donating a drink. Cheers!

        1 Reply Last reply
        1
        • MooCloud_MattM MooCloud_Matt

          Hello to all,

          I'm trying a bit N8N, to see the performance on various tasks that now we use some bash or python script to do.

          But I wasn't able to use the Node Crypto function, even when I set the ENV to export NODE_FUNCTION_ALLOW_EXTERNAL=* or
          export NODE_FUNCTION_ALLOW_EXTERNAL=crypto

          I even try with the API to add ENV to the container directly but Nada.

          my test crypt in the Function node is this:

          let crypto;
          const items = [{
              json: {
                  "is disable": "yes"
              }
          }]
          try {
              crypto = await import('crypto');
          } catch (err) {
              return items
          }
          

          088dd749-ffb4-4fcb-81d3-2e8694f40fd3-image.png

          I'm not a good JS dev, and my understanding is pretty basic (i live tnx to the debuggers) so is highly possible that is my code doesn't work, but maybe is some weird implementation with the docker container.

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

          @MooCloud_Matt Since crypto is a node built-in, you have to do:

          export NODE_FUNCTION_ALLOW_BUILTIN=crypto
          

          I fixed up our docs at https://docs.cloudron.io/apps/n8n/#built-in-node-modules

          robiR 1 Reply Last reply
          3
          • girishG girish

            @MooCloud_Matt Since crypto is a node built-in, you have to do:

            export NODE_FUNCTION_ALLOW_BUILTIN=crypto
            

            I fixed up our docs at https://docs.cloudron.io/apps/n8n/#built-in-node-modules

            robiR Offline
            robiR Offline
            robi
            wrote on last edited by
            #4

            @girish should this any some others be added as default for better out of box functionality?

            Conscious tech

            girishG 1 Reply Last reply
            0
            • robiR robi

              @girish should this any some others be added as default for better out of box functionality?

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

              @robi I guess this is something for upstream. Ideally, we don't have to make such decisions since we are not experts on the app.

              1 Reply Last reply
              0
              • girishG girish marked this topic as a question on
              • girishG girish has marked this topic as solved on
              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