[GH-ISSUE #2288] [BUG]: Error ENOTDIR: not a directory, mkdir when launching AnythingLLMDesktop #1492

Closed
opened 2026-02-22 18:25:05 -05:00 by yindo · 2 comments
Owner

Originally created by @ben7sys on GitHub (Sep 14, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2288

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

When I try to start AnythingLLMDesktop, the application throws an error related to creating a directory inside the .asar file:

Uncaught Exception:
Error: ENOTDIR: not a directory, mkdir '/home/sieben/AnythingLLMDesktop/anythingllm-desktop/resources/app.asar/dist-electron/main/AppData'
    at Object.mkdirSync (node:fs:1396:3)
    at Object.<anonymous> (/home/sieben/AnythingLLMDesktop/anythingllm-desktop/resources/app.asar/dist-electron/main/index.js:71:32443)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)
    at Object..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at node:internal/modules/cjs/loader:967:12
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at node:electron/js2c/browser_init:2:122709
    at node:electron/js2c/browser_init:2:122912
    at node:electron/js2c/browser_init:2:122916

The application is trying to create a directory inside the .asar archive, which is not writable due to its nature as a compressed archive.

I attempted to extract the .asar file to allow the app to run from an uncompressed source, but the issue persists. The app does not launch properly after extraction.

Are there known steps to reproduce?

I use Linux 6.10.9 with Wayland and KDE Plasma

  1. curl -fsSL https://s3.us-west-1.amazonaws.com/public.useanything.com/latest/installer.sh | sh
  2. ./start
  3. Error
Originally created by @ben7sys on GitHub (Sep 14, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2288 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? When I try to start AnythingLLMDesktop, the application throws an error related to creating a directory inside the `.asar` file: ``` Uncaught Exception: Error: ENOTDIR: not a directory, mkdir '/home/sieben/AnythingLLMDesktop/anythingllm-desktop/resources/app.asar/dist-electron/main/AppData' at Object.mkdirSync (node:fs:1396:3) at Object.<anonymous> (/home/sieben/AnythingLLMDesktop/anythingllm-desktop/resources/app.asar/dist-electron/main/index.js:71:32443) at Module._compile (node:internal/modules/cjs/loader:1271:14) at Object..js (node:internal/modules/cjs/loader:1326:10) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/asar_bundle:2:13327) at node:electron/js2c/browser_init:2:122709 at node:electron/js2c/browser_init:2:122912 at node:electron/js2c/browser_init:2:122916 ``` The application is trying to create a directory inside the `.asar` archive, which is not writable due to its nature as a compressed archive. I attempted to extract the `.asar` file to allow the app to run from an uncompressed source, but the issue persists. The app does not launch properly after extraction. ### Are there known steps to reproduce? I use Linux 6.10.9 with Wayland and KDE Plasma 1. `curl -fsSL https://s3.us-west-1.amazonaws.com/public.useanything.com/latest/installer.sh | sh` 2. ./start 3. Error
yindo added the possible bug label 2026-02-22 18:25:05 -05:00
yindo closed this issue 2026-02-22 18:25:05 -05:00
Author
Owner

@timothycarambat commented on GitHub (Sep 16, 2024):

On Ubuntu, we extract the AppImage because it tries to mount to tmp which is by default unwritable and cannot run the ORM for migrations. So everything should end up in $HOME/AnythingLLMDesktop

The start command should be in $HOME/AnythingLLMDesktop and its not clear if from the second item you are in the correct directory (which .start should not even run if not since that would not exist?)

It should not be writing anything inside the ASAR, for exactly as described in the issue - that log does not seem to indicate some call from code we wrote to produce that error (nor why its trying to make an AppData?)

@timothycarambat commented on GitHub (Sep 16, 2024): On Ubuntu, we extract the AppImage because it tries to mount to `tmp` which is by default unwritable and cannot run the ORM for migrations. So everything should end up in `$HOME/AnythingLLMDesktop` The `start` command should be in `$HOME/AnythingLLMDesktop` and its not clear if from the second item you are in the correct directory (which `.start` should not even run if not since that would not exist?) It should not be writing anything inside the ASAR, for exactly as described in the issue - that log does not seem to indicate some call from code we wrote to produce that error (nor why its trying to make an AppData?)
Author
Owner

@ben7sys commented on GitHub (Sep 20, 2024):

I didn’t document this step. Of course, i switched to the AnythingLLMDesktop directory first.

cd ~
curl -fsSL https://s3.us-west-1.amazonaws.com/public.useanything.com/latest/installer.sh | sh
cd ~/AnythingLLMDesktop
./start

I just tried it again the way you described it in the documentation:

curl -fsSL https://s3.us-west-1.amazonaws.com/public.useanything.com/latest/installer.sh | sh
./AnythingLLMDesktop/start

Again the same JavaScript error occurred in the main process:

Uncaught Exception:
Error: ENOTDIR: not a directory, mkdir '/home/sieben/AnythingLLMDesktop/anythingllm-desktop/resources/app.asar/dist-electron/main/AppData'
    at Object.mkdirSync (node:fs:1396:3)
    at Object.<anonymous> (/home/sieben/AnythingLLMDesktop/anythingllm-desktop/resources/app.asar/dist-electron/main/index.js:71:32443)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)
    at Object..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at node:internal/modules/cjs/loader:967:12
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at node:electron/js2c/browser_init:2:122709
    at node:electron/js2c/browser_init:2:122912
    at node:electron/js2c/browser_init:2:122916

It might simply be due to my system configuration. Unfortunately, all my attempts to get AnythingLLM running on my system have failed.

Since I'm now using AnythingLLM with Docker and I'm not sure if the issue is related to my specific system configuration, I'll go ahead and close this ticket. Thank you for your support!

@ben7sys commented on GitHub (Sep 20, 2024): I didn’t document this step. Of course, i switched to the AnythingLLMDesktop directory first. ```bash cd ~ curl -fsSL https://s3.us-west-1.amazonaws.com/public.useanything.com/latest/installer.sh | sh cd ~/AnythingLLMDesktop ./start ``` I just tried it again the way you described it in the documentation: ```bash curl -fsSL https://s3.us-west-1.amazonaws.com/public.useanything.com/latest/installer.sh | sh ./AnythingLLMDesktop/start ``` Again the same JavaScript error occurred in the main process: ``` Uncaught Exception: Error: ENOTDIR: not a directory, mkdir '/home/sieben/AnythingLLMDesktop/anythingllm-desktop/resources/app.asar/dist-electron/main/AppData' at Object.mkdirSync (node:fs:1396:3) at Object.<anonymous> (/home/sieben/AnythingLLMDesktop/anythingllm-desktop/resources/app.asar/dist-electron/main/index.js:71:32443) at Module._compile (node:internal/modules/cjs/loader:1271:14) at Object..js (node:internal/modules/cjs/loader:1326:10) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/asar_bundle:2:13327) at node:electron/js2c/browser_init:2:122709 at node:electron/js2c/browser_init:2:122912 at node:electron/js2c/browser_init:2:122916 ``` It might simply be due to my system configuration. Unfortunately, all my attempts to get AnythingLLM running on my system have failed. Since I'm now using AnythingLLM with Docker and I'm not sure if the issue is related to my specific system configuration, I'll go ahead and close this ticket. Thank you for your support!
yindo changed title from [BUG]: Error ENOTDIR: not a directory, mkdir when launching AnythingLLMDesktop to [GH-ISSUE #2288] [BUG]: Error ENOTDIR: not a directory, mkdir when launching AnythingLLMDesktop 2026-06-05 14:41:04 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1492