<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Logic Functions (LOCAL driver) fail on the read-only filesystem]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I'm running the Twenty CRM Cloudron app and trying to use <strong>Logic Functions</strong> with <code>LOGIC_FUNCTION_TYPE=LOCAL</code>. Execution fails systematically because the local driver tries to create a <code>.yarn</code> directory inside the read-only <code>/app/code</code>, which Cloudron doesn't allow. This looks like a packaging gap rather than a Twenty bug, and the fix appears small.</p>
<h3>Environment</h3>
<ul>
<li>Cloudron: 9.2.0</li>
<li>Twenty app package version: 1.1.0</li>
<li>Twenty version: 2.9.0</li>
<li>Relevant config: <code>LOGIC_FUNCTION_TYPE=LOCAL</code></li>
</ul>
<h3>What happens</h3>
<p dir="auto">When a workflow triggers a Logic Function, the server throws:</p>
<pre><code>ERROR [LogicFunctionExecutorService] Logic function execution failed: ... driver=LocalDriver, mode=LIVE:
Internal Error: ENOENT: no such file or directory, mkdir '/app/code/packages/twenty-server/.yarn'
    at copyYarnEngineAndBuildDependencies (.../application-package/utils/copy-yarn-engine-and-build-dependencies.js)
    at LocalLayerManagerService.ensureDepsLayer (.../logic-function-drivers/drivers/local/services/local-layer-manager.service.js)
    at LocalDriver.execute (.../logic-function-drivers/drivers/local.driver.js)
</code></pre>
<h3>Root cause</h3>
<p dir="auto">The LOCAL driver's <code>LocalLayerManagerService</code> builds a per-function dependency layer by creating a <code>.yarn</code> directory <strong>inside</strong> <code>packages/twenty-server/</code> and copying the Yarn engine into it. Since <code>/app/code</code> is mounted read-only on Cloudron, the <code>mkdir</code> fails.</p>
<p dir="auto">I confirmed it's the mount, not a permission issue, even in the Web Terminal:</p>
<pre><code># id
uid=0(root) gid=0(root) groups=0(root)
# touch /app/code/_test_write
touch: cannot touch '/app/code/_test_write': Read-only file system
</code></pre>
<p dir="auto">Two observations that point straight at the fix:</p>
<ol>
<li>The Yarn engine <strong>is</strong> present, but only at the monorepo root (<code>/app/code/.yarn</code>, <code>.yarnrc.yml</code>, <code>.corepack</code>). It's the per-package <code>packages/twenty-server/.yarn</code> that's missing and can't be created.</li>
<li>The package <strong>already</strong> redirects writable runtime paths under <code>twenty-server</code> to <code>/run</code> via symlinks:</li>
</ol>
<pre><code>packages/twenty-server/.cache -&gt; /run/twenty-server/cache
packages/twenty-server/.env   -&gt; /run/twenty-server/.env
</code></pre>
<p dir="auto">So the same, proven pattern just needs to be extended to <code>.yarn</code>.</p>
<h3>Suggested fix</h3>
<p dir="auto">Apply the existing symlink approach to the layer directory in the Dockerfile:</p>
<pre><code>RUN ln -sf /run/twenty-server/yarn /app/code/packages/twenty-server/.yarn
</code></pre>
<p dir="auto">and create the target early in <code>entrypoint.sh</code>:</p>
<pre><code>mkdir -p /run/twenty-server/yarn
</code></pre>
<p dir="auto">A couple of notes for whoever picks this up:</p>
<ul>
<li>The driver doesn't only create <code>.yarn</code>; it then runs a Yarn install to build the deps layer, so the redirect target must stay writable and the container needs outbound network during that step. There may be one or two further writable paths the install needs, worth checking once the first <code>mkdir</code> is unblocked.</li>
<li><code>/run</code> is ephemeral, so the layer would be rebuilt after a restart (same behaviour as <code>.cache</code>). If rebuild-on-restart is undesirable, <code>/app/data/twenty-server/yarn</code> would persist instead.</li>
</ul>
]]></description><link>https://forum.cloudron.io/topic/15621/logic-functions-local-driver-fail-on-the-read-only-filesystem</link><generator>RSS for Node</generator><lastBuildDate>Wed, 17 Jun 2026 07:45:19 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/15621.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 Jun 2026 16:10:21 GMT</pubDate><ttl>60</ttl></channel></rss>