Not able to use Crypto module
-
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 }
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.
-
@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=*
orDid you restart the app after setting the env?
-
@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
-
-