Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Twenty
  3. Logic Functions (LOCAL driver) fail on the read-only filesystem

Logic Functions (LOCAL driver) fail on the read-only filesystem

Scheduled Pinned Locked Moved Twenty
1 Posts 1 Posters 10 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    david.opalia
    wrote last edited by
    #1

    Hi,

    I'm running the Twenty CRM Cloudron app and trying to use Logic Functions with LOGIC_FUNCTION_TYPE=LOCAL. Execution fails systematically because the local driver tries to create a .yarn directory inside the read-only /app/code, which Cloudron doesn't allow. This looks like a packaging gap rather than a Twenty bug, and the fix appears small.

    Environment

    • Cloudron: 9.2.0
    • Twenty app package version: 1.1.0
    • Twenty version: 2.9.0
    • Relevant config: LOGIC_FUNCTION_TYPE=LOCAL

    What happens

    When a workflow triggers a Logic Function, the server throws:

    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)
    

    Root cause

    The LOCAL driver's LocalLayerManagerService builds a per-function dependency layer by creating a .yarn directory inside packages/twenty-server/ and copying the Yarn engine into it. Since /app/code is mounted read-only on Cloudron, the mkdir fails.

    I confirmed it's the mount, not a permission issue, even in the Web Terminal:

    # 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
    

    Two observations that point straight at the fix:

    1. The Yarn engine is present, but only at the monorepo root (/app/code/.yarn, .yarnrc.yml, .corepack). It's the per-package packages/twenty-server/.yarn that's missing and can't be created.
    2. The package already redirects writable runtime paths under twenty-server to /run via symlinks:
    packages/twenty-server/.cache -> /run/twenty-server/cache
    packages/twenty-server/.env   -> /run/twenty-server/.env
    

    So the same, proven pattern just needs to be extended to .yarn.

    Suggested fix

    Apply the existing symlink approach to the layer directory in the Dockerfile:

    RUN ln -sf /run/twenty-server/yarn /app/code/packages/twenty-server/.yarn
    

    and create the target early in entrypoint.sh:

    mkdir -p /run/twenty-server/yarn
    

    A couple of notes for whoever picks this up:

    • The driver doesn't only create .yarn; 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 mkdir is unblocked.
    • /run is ephemeral, so the layer would be rebuilt after a restart (same behaviour as .cache). If rebuild-on-restart is undesirable, /app/data/twenty-server/yarn would persist instead.
    1 Reply Last reply
    1

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Bookmarks
    • Search