[GH-ISSUE #1889] installing without docker doesn't work out of the box #1176

Closed
opened 2026-03-02 11:55:31 +03:00 by kerem · 4 comments
Owner

Originally created by @CallMeFoxie on GitHub (Sep 5, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1889

Describe the Bug

Hi, it seems that installing using the karakeep-linux.sh script (at least on Debian Trixie) doesn't work, as it doesn't generate index.js for the worker:
Error: Cannot find module '/opt/karakeep/apps/workers/dist/index.js'

ashley@karakeep:~$ ls -la /opt/karakeep/apps/workers/dist/
total 22028
drwxr-xr-x 2 karakeep karakeep     4096 Sep  5 08:36 .
drwxr-xr-x 6 karakeep karakeep     4096 Sep  5 08:21 ..
-rw-r--r-- 1 root     root         4684 Sep  5 08:36 fileFromPath-C7Pj3lIx.mjs
-rw-r--r-- 1 root     root         7552 Sep  5 08:36 fileFromPath-C7Pj3lIx.mjs.map
-rw-r--r-- 1 root     root      9528001 Sep  5 08:36 index.mjs
-rw-r--r-- 1 root     root     12769571 Sep  5 08:36 index.mjs.map
-rw-r--r-- 1 root     root        89638 Sep  5 08:36 isFile-CAdLIt4X.mjs
-rw-r--r-- 1 root     root       137982 Sep  5 08:36 isFile-CAdLIt4X.mjs.map

there's only index.mjs and map, but not actual .js?

.. and thus the worker doesn't start up and create the database etc etc

(full log for the worker is repeating

Node.js v22.19.0
node:internal/modules/cjs/loader:1386
  throw err;
  ^

Error: Cannot find module '/opt/karakeep/apps/workers/dist/index.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22)
    at Function._load (node:internal/modules/cjs/loader:1192:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

)

Steps to Reproduce

  1. install using karakeep-linux.sh on debian trixie
  2. check the logs, observe the worker isn't starting up

Expected Behaviour

for the installer to install the index.js as well

Screenshots or Additional Context

No response

Device Details

No response

Exact Karakeep Version

0.26.0

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem
Originally created by @CallMeFoxie on GitHub (Sep 5, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1889 ### Describe the Bug Hi, it seems that installing using the karakeep-linux.sh script (at least on Debian Trixie) doesn't work, as it doesn't generate index.js for the worker: `Error: Cannot find module '/opt/karakeep/apps/workers/dist/index.js'` ``` ashley@karakeep:~$ ls -la /opt/karakeep/apps/workers/dist/ total 22028 drwxr-xr-x 2 karakeep karakeep 4096 Sep 5 08:36 . drwxr-xr-x 6 karakeep karakeep 4096 Sep 5 08:21 .. -rw-r--r-- 1 root root 4684 Sep 5 08:36 fileFromPath-C7Pj3lIx.mjs -rw-r--r-- 1 root root 7552 Sep 5 08:36 fileFromPath-C7Pj3lIx.mjs.map -rw-r--r-- 1 root root 9528001 Sep 5 08:36 index.mjs -rw-r--r-- 1 root root 12769571 Sep 5 08:36 index.mjs.map -rw-r--r-- 1 root root 89638 Sep 5 08:36 isFile-CAdLIt4X.mjs -rw-r--r-- 1 root root 137982 Sep 5 08:36 isFile-CAdLIt4X.mjs.map ``` there's only index.mjs and map, but not actual .js? .. and thus the worker doesn't start up and create the database etc etc (full log for the worker is repeating ``` Node.js v22.19.0 node:internal/modules/cjs/loader:1386 throw err; ^ Error: Cannot find module '/opt/karakeep/apps/workers/dist/index.js' at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15) at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19) at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22) at Function._load (node:internal/modules/cjs/loader:1192:37) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:237:24) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5) at node:internal/main/run_main_module:36:49 { code: 'MODULE_NOT_FOUND', requireStack: [] } ``` ) ### Steps to Reproduce 1. install using karakeep-linux.sh on debian trixie 2. check the logs, observe the worker isn't starting up ### Expected Behaviour for the installer to install the index.js as well ### Screenshots or Additional Context _No response_ ### Device Details _No response_ ### Exact Karakeep Version 0.26.0 ### Have you checked the troubleshooting guide? - [x] I have checked the troubleshooting guide and I haven't found a solution to my problem
kerem 2026-03-02 11:55:31 +03:00
Author
Owner

@CallMeFoxie commented on GitHub (Sep 5, 2025):

FYI changing
/etc/systemd/system/karakeep-workers.service

ExecStart=/usr/bin/node dist/index.js -> index.mjs fixes this

<!-- gh-comment-id:3257975963 --> @CallMeFoxie commented on GitHub (Sep 5, 2025): FYI changing `/etc/systemd/system/karakeep-workers.service` `ExecStart=/usr/bin/node dist/index.js` -> `index.mjs` fixes this
Author
Owner

@MohamedBassem commented on GitHub (Sep 7, 2025):

I can repro, thanks for the report!

<!-- gh-comment-id:3263591028 --> @MohamedBassem commented on GitHub (Sep 7, 2025): I can repro, thanks for the report!
Author
Owner

@MohamedBassem commented on GitHub (Sep 7, 2025):

Ah I think I found the problem. The linux script installs the last released version, but the build instructions are for the main branch. And the build instructions on main are different from the last branch.

@vhsdream I'm thinking that we can split the installation script into two. The first one downloads the latest released version, and once it unzips it, we invoke the actually version-controlled installation script of that release from the downloaded archive. What do you think?

<!-- gh-comment-id:3263602237 --> @MohamedBassem commented on GitHub (Sep 7, 2025): Ah I think I found the problem. The linux script installs the last released version, but the build instructions are for the main branch. And the build instructions on main are different from the last branch. @vhsdream I'm thinking that we can split the installation script into two. The first one downloads the latest released version, and once it unzips it, we invoke the actually version-controlled installation script of that release from the downloaded archive. What do you think?
Author
Owner

@MohamedBassem commented on GitHub (Sep 7, 2025):

@devome heads up that this will impact the arch installation as well. We'll need to change the systemd unit configs from

ExecStart=/usr/bin/node dist/index.mjs

to

ExecStart=/usr/bin/node dist/index.js
<!-- gh-comment-id:3263955171 --> @MohamedBassem commented on GitHub (Sep 7, 2025): @devome heads up that this will impact the arch installation as well. We'll need to change the systemd unit configs from ``` ExecStart=/usr/bin/node dist/index.mjs ``` to ``` ExecStart=/usr/bin/node dist/index.js ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1176
No description provided.