GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Error: EISDIR: illegal operation on a directory, lstat 'T:\opencode' · Issue #49887 · anomalyco/opencode

Error: EISDIR: illegal operation on a directory, lstat 'T:\opencode' #49887

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Error: EISDIR: illegal operation on a directory, lstat 'T:\opencode'#49887
Copy link
Labels
2.0

Description

@bluelovers
bluelovers
opened on Sep 19, 2026
Issue body actions

Description

ERROR (#1): Error: EISDIR: illegal operation on a directory, lstat 'T:\opencode'

git-bash windows 11

user@ROG-DUO-16 MINGW64 /d/Program Files (AI)/codenomad
$ dotenv --override -- opencode2
[11:13:53.701] ERROR (#1): Error: EISDIR: illegal operation on a directory, lstat 'T:\opencode'

user@ROG-DUO-16 MINGW64 /d/Program Files (AI)/codenomad
$ tsx temp.ts
true
undefined

user@ROG-DUO-16 MINGW64 /d/Program Files (AI)/codenomad
$ dotenv --override -- tsx temp.ts
true
undefined

.env

NODE_TLS_REJECT_UNAUTHORIZED=0
TMPDIR=T:/
TEMP=T:/
TMP=T:/
NEXT_CACHE_DIR=T:/tmp-next

temp.ts

import fs from "fs"

console.log(fs.lstatSync("T:\\opencode").isDirectory())

console.log(fs.mkdirSync("T:\\opencode", { recursive: true }))
call pnpm add -g opencode-ai
call pnpm add -g --allow-build=@opencode-ai/cli @opencode-ai/cli

in v1 opencode will work
in v2 opencode2 will throw error

T:/ is a ram disk

packages/core/src/global.ts

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

win11

Terminal

No response

Reacted by Erich Yu

Activity

  1. opencode-agent
    added
    2.0
    on Sep 19, 2026
  2. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    Thanks for the detailed report and the Node comparison script. I couldn't reproduce this here, because it needs Windows with the temp directory on a RAM disk and this sandbox only runs Linux, so a maintainer with that setup will need to look at it.

    From the code, on startup v2 creates <TMP>\opencode and then resolves its real path (realpath). Your test shows Node handles T:\opencode fine, so the failure may be in how the Bun runtime resolves paths on the RAM-disk volume. That's my guess and I haven't confirmed it.

    This might work around it for now (also untested): point TMP/TEMP/TMPDIR at a folder on a normal disk when you run opencode2.

    It would also help if you could share the output of opencode2 --version and the name of the RAM-disk software you use (e.g. ImDisk).

  3. neriousy
    marked # Desktop crashes on startup: EISDIR: illegal operation on a directory, realpath '<TEMP>\opencode' #59495 as a duplicate of this issue on Nov 12, 2026
  4. opencodejr
    marked desktop: server crashes with EISDIR when TMP points to an ImDisk RAM disk (Bun realpath) #63804 as a duplicate of this issue on Nov 13, 2026
  5. hex636b commented on Nov 21, 2026

    @hex636b
    hex636b
    on Nov 21, 2026
    More actions

    升级ImDisk到3.0+能解决 !
    Upgrade ImDisk can fix it !

    It is not Bun-specific: Node 24.19, Bun 1.4.4 and Bun 1.4.5 all return EISDIR for realpath("R:\\Temp") on that volume, while lstat/readdir/readFile work fine.

    Root cause: the legacy ImDisk driver does not register the volume with the Windows mount manager.

    Upgrading to the DavidXanatos ImDisk fork 3.0.0+, which added Windows mount manager integration,(https://github.com/DavidXanatos/ImDisk), makes the drive a normal volume:

    Official ImDisk 2.1.2 does not help — it is the same legacy design.

  6. neriousy commented on Nov 23, 2026

    @neriousy
    neriousy
    on Nov 23, 2026
    Member
    More actions

    Older ImDisk RAM disk volumes break realpath for Node and Bun too, and upgrading to ImDisk 3.0+ fixes it. Closing since it's an environment issue.

  7. neriousy
    closed this as not plannedon Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.