# Enabling Built in library in code node and Execute Command node

**URL:** <https://community.n8n.io/t/enabling-built-in-library-in-code-node-and-execute-command-node/296105>\
**Category:** Questions\
**Created:** [May 18, 2026, 8:30pm UTC](https://community.n8n.io/t/enabling-built-in-library-in-code-node-and-execute-command-node/296105 "2026-05-18T20:30:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KH\_C](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kh_c/32/106948_2.png) [@KH\_C](https://community.n8n.io/u/KH_C)\
**Post date:** [May 18, 2026, 8:30pm UTC](https://community.n8n.io/t/enabling-built-in-library-in-code-node-and-execute-command-node/296105/1 "2026-05-18T20:30:23Z")

</div>

## Describe the problem/error/question

Hi, I’m running n8n community edition installed via npm on a Mac Mini (Apple Silicon, macOS) managed by a launchd plist at /Library/LaunchDaemons/com.n8n.plist. I’m running into two issues.  
First, I’m trying to enable the Execute Command node, which I understand is blocked by default. I’ve tried setting NODES\_EXCLUDE= both as an environment variable in the launchd plist’s EnvironmentVariables dict and in a .env file placed in my N8N\_USER\_FOLDER, but the node still doesn’t appear in the node panel after reloading the service.

Second, I’m trying to use built-in Node.js modules (fs, path) inside the Code node. I’ve set NODE\_FUNCTION\_ALLOW\_BUILTIN=fs,path in both the plist and the .env file, but I get “module fs is disallowed” when trying to require(‘fs’), and process appears to be completely undefined in the Code node sandbox. Has anyone successfully enabled the Execute Command node and built-in module access on a self-hosted npm install on macOS? Any guidance on the correct configuration and how to verify the environment variables are actually being picked up by the running n8n process would be really appreciated.

## What is the error message (if any)?

## Please share your workflow

```auto
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

```

## Share the output returned by the last node

## Information on your n8n setup

- **n8n version:** 2.20.11
- **Database (default: SQLite): Default**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main): default**
- **Running n8n via (Docker, npm, n8n cloud, desktop app): npm**
- **Operating system: MacOS**

---

<div class="post-metadata">

**Author:** ![tamy.santos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/tamy.santos/32/153776_2.png) [@tamy.santos](https://community.n8n.io/u/tamy.santos)\
**Post date:** [May 18, 2026, 10:17pm UTC](https://community.n8n.io/t/enabling-built-in-library-in-code-node-and-execute-command-node/296105/3 "2026-05-18T22:17:40Z")

</div>

hi @KH_C

A safer alternative is to avoid enabling fs or Execute Command and use the native nodes instead, is that possible for you? For local files, use Read/Write Files from Disk; to generate files, use Convert to File; to extract content, use Extract From File. This avoids depending on the Code node’s sandbox and also reduces the security risk of enabling Execute Command. I would only enable it if you really need to execute system binaries.

---

<div class="post-metadata">

**Author:** ![achamm](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/achamm/32/143734_2.png) [@achamm](https://community.n8n.io/u/achamm)\
**Post date:** [May 19, 2026, 1:44am UTC](https://community.n8n.io/t/enabling-built-in-library-in-code-node-and-execute-command-node/296105/4 "2026-05-19T01:44:45Z")

</div>

@KH_C both issues are real on 2.x so worth unpacking.

execute command got blocked by default starting in 2.x. the documented unblock is NODES\_EXCLUDE set to a literal empty JSON array string, not just empty equals. in your plist:

```auto
<key>NODES_EXCLUDE</key>
<string>[]</string>

```

heads up though, [Unable to re-enable Execute Command node in n8n 2.0 · Issue #23439 · n8n-io/n8n · GitHub](http://github.com/n8n-io/n8n/issues/23439) is an open issue where users report this doesn’t always take effect, so file that under known annoyance.

your .env file isn’t doing anything btw, launchd literally doesnt read .env files, only the plist EnvironmentVariables dict matters. after editing the plist you need a full unload+load (not stop/start):

```auto
sudo launchctl unload /Library/LaunchDaemons/com.n8n.plist
sudo launchctl load /Library/LaunchDaemons/com.n8n.plist

```

then `sudo launchctl getenv NODES_EXCLUDE` to confirm. if that returns `[]` and Execute Command still isn’t there after a hard browser reload you’re hitting #23439 not a config issue.

for fs and path, n8n 2.x runs Code nodes in task runner subprocesses by default. internal mode inherits env from the main n8n process so once `launchctl getenv NODE_FUNCTION_ALLOW_BUILTIN` returns `fs,path` it should propagate to the runner. then `const fs = require('fs')` works directly inside the Code node. process being undefined is intentional even with builtins enabled — security boundary, don’t try to access it.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [August 17, 2026, 1:44am UTC](https://community.n8n.io/t/enabling-built-in-library-in-code-node-and-execute-command-node/296105/5 "2026-08-17T01:44:50Z")

</div>

Closed on August 17, 2026, 1:44am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
