部署与运维
Enable modules in Code node
For security reasons, the Code node restricts importing modules. It's possible to lift that restriction for built-in and external modules by setting the following environment variables:
NODE_FUNCTION_ALLOW_BUILTIN: For built-in modulesNODE_FUNCTION_ALLOW_EXTERNAL: For external modules sourced from n8n/node\_modules directory. External module support is disabled when an environment variable isn't set.
# Allows usage of all builtin modules
export NODE_FUNCTION_ALLOW_BUILTIN=*
# Allows usage of only crypto
export NODE_FUNCTION_ALLOW_BUILTIN=crypto
# Allows usage of only crypto and fs
export NODE_FUNCTION_ALLOW_BUILTIN=crypto,fs
# Allow usage of external npm modules.
export NODE_FUNCTION_ALLOW_EXTERNAL=moment,lodashRefer to Environment variables reference for more information on these variables.
官方原文和授权
本页来自 N8N 英文官方网站固定快照,并转换成 xueai 静态页面。内容以 N8N 持续更新的官方页面为准。