Environment variables with n8n app for Windows

I need to use aws4 lib in function nodes in my app installed n8n environment.
I got this working in other environment adding the following environment variables:

NODE_FUNCTION_ALLOW_EXTERNAL=aws-sdk,aws4,axios
NODE_FUNCTION_ALLOW_BUILTIN=*

I tried to do the same thing, with no success, editing the variable defaultEnv at the following file:

c:\users\Omnier\AppData\Local\Programs\n8n\resources\app\envVars.js

const defaultEnv = N8N_DEPLOYMENT_TYPE='${getDeploymentType()}' EXECUTIONS_PROCESS='main' EXECUTIONS_DATA_SAVE_ON_PROGRESS=true EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS=true N8N_BASIC_AUTH_ACTIVE=true N8N_BASIC_AUTH_USER='${generateRandomString()}' N8N_BASIC_AUTH_PASSWORD='${generateRandomString()}' NODE_FUNCTION_ALLOW_EXTERNAL=aws-sdk,aws4,axios // added NODE_FUNCTION_ALLOW_BUILTIN=* // added N8N_PORT=5679;

There is another way to make this work on Windws installed n8n app?

Thanks in advance.

Hi @marcos.martinewski, you should be able to edit the n8n-desktop.env file inside the .n8n folder of your user directory in order to configure environment variables for n8n desktop.

n8n does, however, not include the aws-sdk module, so this would not be available. So instead of using the desktop app, you might want to consider a different deployment option, for example building your own docker image including all modules you’d like to use.

Worked like a charm!

Thanks a lot!