[GH-ISSUE #2513] Updating to 0.31.0 breaks init-db-migration #1507

Closed
opened 2026-03-02 11:57:45 +03:00 by kerem · 2 comments
Owner

Originally created by @forksnd on GitHub (Feb 24, 2026).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/2513

Describe the Bug

After updating to v0.31.0, the docker container doesn't launch.

Steps to Reproduce

  1. Have a previous Karakeep installation using Docker (ghcr.io/karakeep-app/karakeep:release)
  2. Update to v0.31
  3. Container fails to launch

Expected Behaviour

Container should launch.

Screenshots or Additional Context

No response

Device Details

No response

Exact Karakeep Version

0.31.0

Environment Details

Docker on Debian Bookworm (Digital Ocean VPS)

Debug Logs

s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service init-db-migration: starting
Running db migration script
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
node:internal/modules/run_main:76
  const type = getNearestParentPackageJSONType(mainPath);
               ^

Error: Invalid package config /db_migrations/package.json.
    at shouldUseESMLoader (node:internal/modules/run_main:76:16)
    at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:147:20)
    at node:internal/main/run_main_module:33:47 {
  code: 'ERR_INVALID_PACKAGE_CONFIG'
}

Node.js v24.13.1
s6-rc: warning: unable to start service init-db-migration: command exited 1

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 @forksnd on GitHub (Feb 24, 2026). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/2513 ### Describe the Bug After updating to v0.31.0, the docker container doesn't launch. ### Steps to Reproduce 1. Have a previous Karakeep installation using Docker (`ghcr.io/karakeep-app/karakeep:release`) 2. Update to v0.31 3. Container fails to launch ### Expected Behaviour Container should launch. ### Screenshots or Additional Context _No response_ ### Device Details _No response_ ### Exact Karakeep Version 0.31.0 ### Environment Details Docker on Debian Bookworm (Digital Ocean VPS) ### Debug Logs ``` s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service init-db-migration: starting Running db migration script s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started node:internal/modules/run_main:76 const type = getNearestParentPackageJSONType(mainPath); ^ Error: Invalid package config /db_migrations/package.json. at shouldUseESMLoader (node:internal/modules/run_main:76:16) at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:147:20) at node:internal/main/run_main_module:33:47 { code: 'ERR_INVALID_PACKAGE_CONFIG' } Node.js v24.13.1 s6-rc: warning: unable to start service init-db-migration: command exited 1 ``` ### 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:57:45 +03:00
Author
Owner

@forksnd commented on GitHub (Feb 24, 2026):

Docker Compose File:

networks:
  net_karakeep:
    name: net_karakeep


services:
  karakeep:
    image: ghcr.io/karakeep-app/karakeep:release
    container_name: karakeep
    restart: unless-stopped
    env_file:
      - $DOCKERDIR/.envs/karakeep
    volumes:
      - $DOCKERDIR/data/karakeep/data:/data
      - $DATADIR/documents/archive/webpages:/data/assets
    labels:
      - "traefik.enable=true"
      # HTTP Routers
      - "traefik.http.routers.karakeep-rtr.entrypoints=web"
      - "traefik.http.routers.karakeep-rtr.rule=Host(`archive.$DOMAIN`)"
      # Middlewares
      - "traefik.http.routers.karakeep-rtr.middlewares=chain-no-auth@file"
      # HTTP Services
      - "traefik.http.routers.karakeep-rtr.service=karakeep-svc"
      - "traefik.http.services.karakeep-svc.loadbalancer.server.port=3000"

      - homepage.group=Reading
      - homepage.name=Karakeep
      - homepage.href=http://archive.$DOMAIN
      - homepage.description=Webpage Archive
    environment:
      - DATA_DIR=/data # DON'T CHANGE THIS
      - MEILI_ADDR=http://karakeep-meilisearch:7700
      - BROWSER_WEB_URL=http://karakeep-chrome:9222
      - CRAWLER_FULL_PAGE_ARCHIVE=true
      - CRAWLER_JOB_TIMEOUT_SEC=600
      - CRAWLER_NUM_WORKERS=3
      - OCR_LANGS=eng,hin
      - INFERENCE_ENABLE_AUTO_SUMMARIZATION=true
    networks:
      - net_reverse_proxy
      - net_karakeep

  karakeep-chrome:
    image: gcr.io/zenika-hub/alpine-chrome:124
    container_name: karakeep-chrome
    restart: unless-stopped
    command:
      - --no-sandbox
      - --disable-gpu
      - --disable-dev-shm-usage
      - --remote-debugging-address=0.0.0.0
      - --remote-debugging-port=9222
      - --hide-scrollbars
    networks:
      - net_karakeep

  karakeep-meilisearch:
    image: getmeili/meilisearch:v1.13.3
    container_name: karakeep-meilisearch
    restart: unless-stopped
    env_file:
      - $DOCKERDIR/.envs/karakeep
    environment:
      - MEILI_NO_ANALYTICS=true
    volumes:
      - $DOCKERDIR/data/karakeep/meilisearch:/meili_data
    networks:
      - net_karakeep

.env file:

NEXTAUTH_SECRET=xyz
MEILI_MASTER_KEY=pqr
NEXTAUTH_URL=http://archive.app.home.arpa
OPENAI_API_KEY=abc
<!-- gh-comment-id:3951024246 --> @forksnd commented on GitHub (Feb 24, 2026): Docker Compose File: ``` networks: net_karakeep: name: net_karakeep services: karakeep: image: ghcr.io/karakeep-app/karakeep:release container_name: karakeep restart: unless-stopped env_file: - $DOCKERDIR/.envs/karakeep volumes: - $DOCKERDIR/data/karakeep/data:/data - $DATADIR/documents/archive/webpages:/data/assets labels: - "traefik.enable=true" # HTTP Routers - "traefik.http.routers.karakeep-rtr.entrypoints=web" - "traefik.http.routers.karakeep-rtr.rule=Host(`archive.$DOMAIN`)" # Middlewares - "traefik.http.routers.karakeep-rtr.middlewares=chain-no-auth@file" # HTTP Services - "traefik.http.routers.karakeep-rtr.service=karakeep-svc" - "traefik.http.services.karakeep-svc.loadbalancer.server.port=3000" - homepage.group=Reading - homepage.name=Karakeep - homepage.href=http://archive.$DOMAIN - homepage.description=Webpage Archive environment: - DATA_DIR=/data # DON'T CHANGE THIS - MEILI_ADDR=http://karakeep-meilisearch:7700 - BROWSER_WEB_URL=http://karakeep-chrome:9222 - CRAWLER_FULL_PAGE_ARCHIVE=true - CRAWLER_JOB_TIMEOUT_SEC=600 - CRAWLER_NUM_WORKERS=3 - OCR_LANGS=eng,hin - INFERENCE_ENABLE_AUTO_SUMMARIZATION=true networks: - net_reverse_proxy - net_karakeep karakeep-chrome: image: gcr.io/zenika-hub/alpine-chrome:124 container_name: karakeep-chrome restart: unless-stopped command: - --no-sandbox - --disable-gpu - --disable-dev-shm-usage - --remote-debugging-address=0.0.0.0 - --remote-debugging-port=9222 - --hide-scrollbars networks: - net_karakeep karakeep-meilisearch: image: getmeili/meilisearch:v1.13.3 container_name: karakeep-meilisearch restart: unless-stopped env_file: - $DOCKERDIR/.envs/karakeep environment: - MEILI_NO_ANALYTICS=true volumes: - $DOCKERDIR/data/karakeep/meilisearch:/meili_data networks: - net_karakeep ``` `.env` file: ``` NEXTAUTH_SECRET=xyz MEILI_MASTER_KEY=pqr NEXTAUTH_URL=http://archive.app.home.arpa OPENAI_API_KEY=abc ```
Author
Owner

@forksnd commented on GitHub (Feb 24, 2026):

Removing the container, pruning the images and then redownloading and recreating it fixed this. Might be some kind of corruption.

<!-- gh-comment-id:3953899861 --> @forksnd commented on GitHub (Feb 24, 2026): Removing the container, pruning the images and then redownloading and recreating it fixed this. Might be some kind of corruption.
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#1507
No description provided.