Skip to content

[Feature request] Switch to Valkey instead of redis / Run without docker #67

Closed

Description

@Morethanevil

Your project looks very intresting!

I wanted to ask, since Redis changed license could you consider switching to Valkey instead? It is a drop-in replacement because it is a fork from Redis by The Linux Foundation.

And I wanted to know if there is a way to run docmost without docker in production?

Activity

  1. Philipinho commented on Jul 6, 2024

    @Philipinho
    Member

    Since Valkey is a redis-compatible, you can use Valkey as the server.

    To install without docker

    First, make sure you have pnpm installed on your server.

    npm install -g pnpm

    Clone the repo

    git clone https://github.com/docmost/docmost
    cd docmost
    

    Install dependencies and build

    pnpm install
    pnpm build
    

    Configure environment variables

    cp .env.example .env
    

    Start program

    pnpm start
    
  2. Morethanevil commented on Jul 7, 2024

    @Morethanevil
    Author

    Thanks for your answer!

    Since Valkey is a redis-compatible, you can use Valkey as the server.

    Yes, that's why I wanted you to use it in your docker-compose.yml :)
    Spreading the word about Valkey.

    I followed your guide, but I needed to set the ENVs before I run pnpm build, otherwise it would fail. So here is my way on a Ubuntu server:

    #sudo is needed because of -g flag and non root user
    
    sudo npm install -g pnpm
    
    git clone https://github.com/docmost/docmost
    
    cd docmost
    
    #for Postgres and app secret
    
    openssl rand -hex 32
    openssl rand -hex 32
    
    cp .env.example .env
    
    #make customisations
    
    nano .env
    
    pnpm install
    pnpm build

    The only thing that does not work for now is redis via unix-socket :D

    I get this message:

    The Environment variables has failed the following validations:
    {"isUrl":"REDIS_URL must be a valid redis connection string"}
    Please fix the environment variables and try again. Exiting program...

    In my ENV I have this connection URL:
    REDIS_URL=unix:///var/run/redis/redis.sock

    Tried with
    REDIS_URL=redis:///var/run/redis/redis.sock
    REDIS_URL=redis+socket:///var/run/redis/redis.sock
    REDIS_URL=unix:///var/run/redis/redis.sock?db=0

    as connection URL, but it does not work. The Redissocket itself runs fine, Nextcloud and Wordpress are using it.

  3. Philipinho commented on Jul 7, 2024

    @Philipinho
    Member

    The REDIS_URL variable expects redis or rediss hence the validation error.

  4. Morethanevil commented on Jul 7, 2024

    @Morethanevil
    Author

    Is there a way to use redis sockets, or do I need to wait for fix?

    As I said REDIS_URL=redis:///var/run/redis/redis.sock does not work. Same error message

  5. Philipinho commented on Jul 7, 2024

    @Philipinho
    Member

    The Unix_sockets requires using path instead of host. There is no support for it at this time.
    Your best bet is to continue using the connection string.

  6. Morethanevil commented on Jul 7, 2024

    @Morethanevil
    Author

    Then I need to use a container for redis 😔
    Switching back to TCP connections on the host will greatly decrease the performance of Nextcloud

    Socket support would be nice, I will keep an eye on the release notes. Thank you so far

  7. Morethanevil commented on Jul 7, 2024

    @Morethanevil
    Author

    I setup with Redis via docker but I only get a blank page instead of setup.

    Bildschirmfoto_20240707_221909

    My .env:

    # your domain, e.g https://example.com
    APP_URL=https://docs.mydomain.com
    PORT=8665
    
    # make sure to replace this.
    APP_SECRET=#######
    
    JWT_TOKEN_EXPIRES_IN=30d
    
    DATABASE_URL="postgresql://user:longpassword@localhost:5432/docmost?schema=public"
    REDIS_URL=redis://172.20.0.87:6379
    
    # options: local | s3
    STORAGE_DRIVER=s3
    
    # S3 driver config
    AWS_S3_ACCESS_KEY_ID=#######
    AWS_S3_SECRET_ACCESS_KEY=#######
    AWS_S3_REGION=#######
    AWS_S3_BUCKET=#######
    AWS_S3_ENDPOINT=#######
    
    # options: smtp | postmark
    MAIL_DRIVER=smtp
    MAIL_FROM_ADDRESS=#######
    MAIL_FROM_NAME=#######
    
    # SMTP driver config
    SMTP_HOST=#######
    SMTP_PORT=587
    SMTP_USERNAME=#######
    SMTP_PASSWORD=#######
    # Postmark driver config
    #POSTMARK_TOKEN=

    Console output:

    pnpm start
    
    > [email protected] start /apps/docmost
    > pnpm --filter ./apps/server run start:prod
    
    
    > [email protected] start:prod /apps/docmost/apps/server
    > cross-env NODE_ENV=production node dist/main
    
    [Nest] 3439275  - 07/07/2024, 10:18:15 PM     LOG [NestFactory] Starting Nest application...
    [Nest] 3439275  - 07/07/2024, 10:18:15 PM     LOG [DatabaseModule] Establishing database connection
    [Nest] 3439275  - 07/07/2024, 10:18:15 PM     LOG [DatabaseModule] Database connection successful
    [Nest] 3439275  - 07/07/2024, 10:18:15 PM     LOG [DatabaseMigrationService] No pending database migrations
    [Nest] 3439275  - 07/07/2024, 10:18:15 PM     LOG [NestApplication] Nest application successfully started
  8. Philipinho commented on Jul 7, 2024

    @Philipinho
    Member

    Are there any errors on the browser console log?

  9. Morethanevil commented on Jul 8, 2024

    @Morethanevil
    Author

    I append the log from Brave
    Bildschirmfoto_20240708_043616
    brave-1720406188371.log

    I tried to put the APP_URL in quotes, but it did not change anything.

    APP_URL='https://docs.domain.com'
    APP_URL="https://docs.domain.com"

    Maybe related to Issue 28?

  10. Philipinho commented on Jul 8, 2024

    @Philipinho
    Member

    Are you on the most recent release? If not, you should upgrade.

  11. Morethanevil commented on Jul 8, 2024

    @Morethanevil
    Author

    Yes I am, I posted the console output under my ENV file. 0.2.4 is the latest release

    I will try to start from scratch when I am at home

  12. Morethanevil commented on Jul 8, 2024

    @Morethanevil
    Author

    Okay I tried starting from scratch. I run these commands:

    sudo rm -rf docmost #removing old folder

    git clone https://github.com/docmost/docmost

    cd docmost

    pnpm store prune #removing cache files from pnpm

    pnpm install

    pnpm build

    When I run pnpm buildI get this error message:

    pnpm build
    
    > [email protected] build /apps/docmost
    > nx run-many -t build
    
    
       ✔  nx run @docmost/editor-ext:build (2s)
    
    ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
       ✖  nx run client:build
          > [email protected] build /apps/docmost/apps/client
          > tsc && vite build
          
          src/features/comment/components/comment-dialog.tsx(38,28): error TS2339: Property 'unsetCommentDecoration' does not exist on type 'ChainedCommands'.
          src/features/comment/components/comment-dialog.tsx(59,10): error TS2551: Property 'setComment' does not exist on type 'ChainedCommands'. Did you mean 'setContent'?
          src/features/comment/components/comment-list-item.tsx(53,24): error TS2339: Property 'unsetComment' does not exist on type 'SingleCommands'.
          src/features/editor/components/bubble-menu/bubble-menu.tsx(27,49): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/bubble-menu/bubble-menu.tsx(89,36): error TS2339: Property 'setCommentDecoration' does not exist on type 'ChainedCommands'.
          src/features/editor/components/callout/callout-menu.tsx(19,29): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/callout/callout-menu.tsx(51,10): error TS2339: Property 'updateCalloutType' does not exist on type 'ChainedCommands'.
          src/features/editor/components/callout/callout-view.tsx(15,29): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/image/image-menu.tsx(50,8): error TS2339: Property 'setImageAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/image-menu.tsx(58,8): error TS2339: Property 'setImageAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/image-menu.tsx(66,8): error TS2339: Property 'setImageAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/image-menu.tsx(75,10): error TS2339: Property 'setImageWidth' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/upload-image-action.tsx(1,35): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/slash-menu/menu-items.ts(187,12): error TS2339: Property 'insertTable' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(196,51): error TS2339: Property 'toggleDetails' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(213,51): error TS2339: Property 'toggleCallout' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(235,12): error TS2339: Property 'setMathInline' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(254,51): error TS2339: Property 'setMathBlock' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(8,33): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/table/table-cell-menu.tsx(31,30): error TS2339: Property 'mergeCells' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(35,30): error TS2339: Property 'splitCell' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(39,30): error TS2339: Property 'deleteColumn' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(43,30): error TS2339: Property 'deleteRow' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(23,33): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/table/table-menu.tsx(52,30): error TS2339: Property 'addColumnBefore' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(56,30): error TS2339: Property 'addColumnAfter' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(60,30): error TS2339: Property 'deleteColumn' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(64,30): error TS2339: Property 'addRowBefore' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(68,30): error TS2339: Property 'addRowAfter' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(72,30): error TS2339: Property 'deleteRow' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(76,30): error TS2339: Property 'deleteTable' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/upload-video-action.tsx(1,35): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/video/video-menu.tsx(50,8): error TS2339: Property 'setVideoAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/video-menu.tsx(58,8): error TS2339: Property 'setVideoAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/video-menu.tsx(66,8): error TS2339: Property 'setVideoAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/video-menu.tsx(75,10): error TS2339: Property 'setVideoWidth' does not exist on type 'ChainedCommands'.
          src/features/editor/extensions/extensions.ts(36,8): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
           ELIFECYCLE  Command failed with exit code 2.
          
          
       ✔  nx run server:build (5s)
    
    ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
    
     NX   Ran target build for 3 projects (5s)
    
       ✔  2/3 succeeded [0 read from cache]
    
       ✖  1/3 targets failed, including the following:
    
          - nx run client:build
    
     ELIFECYCLE  Command failed with exit code 1.
    mte@fedifriends/apps/docmost$ pnpm build
    
    > [email protected] build /apps/docmost
    > nx run-many -t build
    
    
       ✔  nx run @docmost/editor-ext:build  [existing outputs match the cache, left as is]
       ✔  nx run server:build  [existing outputs match the cache, left as is]
       ✔  nx run client:build (9s)
    
    ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
    
     NX   Successfully ran target build for 3 projects (9s)
    
    Nx read the output from the cache instead of running the command for 2 out of 3 tasks.

    Now I run pnpm buildagain and it is successful. I can start docmost:

    Bildschirmfoto_20240708_150527

    But I still get a blank page with error 415. What am I doing wrong?

  13. Philipinho commented on Jul 8, 2024

    @Philipinho
    Member

    The frontend is not building.
    What node version are you on?

  14. Morethanevil commented on Jul 8, 2024

    @Morethanevil
    Author

    node --version
    v22.4.0

    Official Node PPA for Ubuntu

  15. Philipinho commented on Jul 9, 2024

    @Philipinho
    Member

    Can you please try again with a fresh install? I am still unable to reproduce.

    You can use these commands:

    git clone https://github.com/docmost/docmost
    cd docmost
    pnpm install --frozen-lockfile
    pnpm build
    

    I look forward to your feedback.

  16. Morethanevil commented on Jul 10, 2024

    @Morethanevil
    Author
    mte@hostname/apps$ git clone https://github.com/docmost/docmost
    Cloning into 'docmost'...
    remote: Enumerating objects: 5722, done.
    remote: Counting objects: 100% (377/377), done.
    remote: Compressing objects: 100% (207/207), done.
    remote: Total 5722 (delta 178), reused 292 (delta 159), pack-reused 5345
    Receiving objects: 100% (5722/5722), 2.22 MiB | 25.81 MiB/s, done.
    Resolving deltas: 100% (3427/3427), done.
    
    
    mte@hostname/apps$ cd docmost/
    
    
    mte@hostname/apps/docmost$ pnpm install --frozen-lockfile
    
    
    Scope: all 4 workspace projects
    Lockfile is up to date, resolution step is skipped
    Packages: +1583
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Downloading [email protected]: 5.76 MB/5.76 MB, done
    Downloading @swc/[email protected]: 20.62 MB/20.62 MB, done
    Downloading @swc/[email protected]: 16.67 MB/16.67 MB, done
    Downloading @next/[email protected]: 38.80 MB/38.80 MB, done
    Downloading @swc/[email protected]: 18.85 MB/18.85 MB, done
    Downloading @swc/[email protected]: 15.81 MB/15.81 MB, done
    Downloading [email protected]: 7.15 MB/7.15 MB, done
    Downloading @next/[email protected]: 46.39 MB/46.39 MB, done
    Downloading @emoji-mart/[email protected]: 5.39 MB/5.39 MB, done
    Downloading [email protected]: 20.77 MB/20.77 MB, done
    Progress: resolved 1583, reused 0, downloaded 1562, added 1583, done
    node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@swc/core: Running postinstall script, done in 101ms
    node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@swc/core: Running postinstall script, done in 101ms
    node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_vbd7z5vkodjjhyjxdavbf2isw4/node_modules/@nestjs/core: Running postinstall script, done in 204msules/.pnpm/[email protected]/node_modules/esbuild: Running postinstall script, done in 90ms
    node_modules/.pnpm/[email protected]/node_modules/esbuild: Running postinstall script, done in 91ms
    node_modules/.pnpm/[email protected]/node_modules/msgpackr-extract: Running install script, done in 63ms
    node_modules/.pnpm/[email protected]/node_modules/bcrypt: Running install script...
    node_modules/.pnpm/[email protected]/node_modules/bcrypt: Running install script, done in 543ms
    node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_/node_modules/nx: Running postinstall script, done in 520ms
    
    dependencies:
    + @docmost/editor-ext <- packages/editor-ext
    + @hocuspocus/extension-redis 2.13.5
    + @hocuspocus/provider 2.13.5
    + @hocuspocus/server 2.13.5
    + @hocuspocus/transformer 2.13.5
    + @sindresorhus/slugify 2.2.1
    + @tiptap/core 2.4.0
    + @tiptap/extension-code-block 2.4.0
    + @tiptap/extension-collaboration 2.4.0
    + @tiptap/extension-collaboration-cursor 2.4.0
    + @tiptap/extension-color 2.4.0
    + @tiptap/extension-document 2.4.0
    + @tiptap/extension-heading 2.4.0
    + @tiptap/extension-highlight 2.4.0
    + @tiptap/extension-history 2.4.0
    + @tiptap/extension-image 2.4.0
    + @tiptap/extension-link 2.4.0
    + @tiptap/extension-list-item 2.4.0
    + @tiptap/extension-list-keymap 2.4.0
    + @tiptap/extension-mention 2.4.0
    + @tiptap/extension-placeholder 2.4.0
    + @tiptap/extension-subscript 2.4.0
    + @tiptap/extension-superscript 2.4.0
    + @tiptap/extension-table 2.4.0
    + @tiptap/extension-table-cell 2.4.0
    + @tiptap/extension-table-header 2.4.0
    + @tiptap/extension-table-row 2.4.0
    + @tiptap/extension-task-item 2.4.0
    + @tiptap/extension-task-list 2.4.0
    + @tiptap/extension-text 2.4.0
    + @tiptap/extension-text-align 2.4.0
    + @tiptap/extension-text-style 2.4.0
    + @tiptap/extension-typography 2.4.0
    + @tiptap/extension-underline 2.4.0
    + @tiptap/extension-youtube 2.4.0
    + @tiptap/html 2.4.0
    + @tiptap/pm 2.4.0
    + @tiptap/react 2.4.0
    + @tiptap/starter-kit 2.4.0
    + @tiptap/suggestion 2.4.0
    + cross-env 7.0.3
    + fractional-indexing-jittered 0.9.1
    + ioredis 5.4.1
    + uuid 10.0.0
    + y-indexeddb 9.0.12
    + yjs 13.6.18
    
    devDependencies:
    + @nx/js 19.3.2
    + @types/uuid 10.0.0
    + concurrently 8.2.2
    + nx 19.3.2
    + tsx 4.15.7
    
    Done in 15.6s
    
    
    mte@hostname/apps/docmost$ pnpm build
    
    > [email protected] build /apps/docmost
    > nx run-many -t build
    
    
       ✔  nx run @docmost/editor-ext:build (2s)
    
    ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
       ✖  nx run client:build
          > [email protected] build /apps/docmost/apps/client
          > tsc && vite build
          
          src/features/comment/components/comment-dialog.tsx(38,28): error TS2339: Property 'unsetCommentDecoration' does not exist on type 'ChainedCommands'.
          src/features/comment/components/comment-dialog.tsx(59,10): error TS2551: Property 'setComment' does not exist on type 'ChainedCommands'. Did you mean 'setContent'?
          src/features/comment/components/comment-list-item.tsx(53,24): error TS2339: Property 'unsetComment' does not exist on type 'SingleCommands'.
          src/features/editor/components/bubble-menu/bubble-menu.tsx(27,49): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/bubble-menu/bubble-menu.tsx(89,36): error TS2339: Property 'setCommentDecoration' does not exist on type 'ChainedCommands'.
          src/features/editor/components/callout/callout-menu.tsx(19,29): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/callout/callout-menu.tsx(51,10): error TS2339: Property 'updateCalloutType' does not exist on type 'ChainedCommands'.
          src/features/editor/components/callout/callout-view.tsx(15,29): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/image/image-menu.tsx(50,8): error TS2339: Property 'setImageAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/image-menu.tsx(58,8): error TS2339: Property 'setImageAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/image-menu.tsx(66,8): error TS2339: Property 'setImageAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/image-menu.tsx(75,10): error TS2339: Property 'setImageWidth' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/upload-image-action.tsx(1,35): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/slash-menu/menu-items.ts(187,12): error TS2339: Property 'insertTable' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(196,51): error TS2339: Property 'toggleDetails' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(213,51): error TS2339: Property 'toggleCallout' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(235,12): error TS2339: Property 'setMathInline' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(254,51): error TS2339: Property 'setMathBlock' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(8,33): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/table/table-cell-menu.tsx(31,30): error TS2339: Property 'mergeCells' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(35,30): error TS2339: Property 'splitCell' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(39,30): error TS2339: Property 'deleteColumn' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(43,30): error TS2339: Property 'deleteRow' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(23,33): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/table/table-menu.tsx(52,30): error TS2339: Property 'addColumnBefore' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(56,30): error TS2339: Property 'addColumnAfter' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(60,30): error TS2339: Property 'deleteColumn' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(64,30): error TS2339: Property 'addRowBefore' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(68,30): error TS2339: Property 'addRowAfter' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(72,30): error TS2339: Property 'deleteRow' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(76,30): error TS2339: Property 'deleteTable' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/upload-video-action.tsx(1,35): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/video/video-menu.tsx(50,8): error TS2339: Property 'setVideoAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/video-menu.tsx(58,8): error TS2339: Property 'setVideoAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/video-menu.tsx(66,8): error TS2339: Property 'setVideoAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/video-menu.tsx(75,10): error TS2339: Property 'setVideoWidth' does not exist on type 'ChainedCommands'.
          src/features/editor/extensions/extensions.ts(36,8): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
           ELIFECYCLE  Command failed with exit code 2.
          
          
       ✔  nx run server:build (5s)
    
    ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
    
     NX   Ran target build for 3 projects (5s)
    
       ✔  2/3 succeeded [0 read from cache]
    
       ✖  1/3 targets failed, including the following:
    
          - nx run client:build
    
     ELIFECYCLE  Command failed with exit code 1.
    
    
    mte@hostname/apps/docmost$lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 24.04 LTS
    Release:        24.04
    Codename:       noble
    
    
    mte@hostname/apps/docmost$ node --version
    v22.4.1

    Running pnpm build again I get this:

    mte@hostname/apps/docmost$ pnpm build
    
    > [email protected] build /apps/docmost
    > nx run-many -t build
    
    
       ✔  nx run @docmost/editor-ext:build  [existing outputs match the cache, left as is]
       ✔  nx run server:build  [existing outputs match the cache, left as is]
       ✔  nx run client:build (9s)
    
    ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
    
     NX   Successfully ran target build for 3 projects (9s)
    
    Nx read the output from the cache instead of running the command for 2 out of 3 tasks.
    
    mte@hostname/apps/docmost$

    Starting for a test:

    mte@hostname/apps/docmost$pnpm start
    
    > [email protected] start /apps/docmost
    > pnpm --filter ./apps/server run start:prod
    
    
    > [email protected] start:prod /apps/docmost/apps/server
    > cross-env NODE_ENV=production node dist/main
    
    [Nest] 462326  - 07/10/2024, 4:47:38 AM     LOG [NestFactory] Starting Nest application...
    [Nest] 462326  - 07/10/2024, 4:47:38 AM     LOG [DatabaseModule] Establishing database connection
    [Nest] 462326  - 07/10/2024, 4:47:38 AM     LOG [DatabaseModule] Database connection successful
    [Nest] 462326  - 07/10/2024, 4:47:38 AM     LOG [DatabaseMigrationService] No pending database migrations
    [Nest] 462326  - 07/10/2024, 4:47:38 AM     LOG [NestApplication] Nest application successfully started

    But only a blank page and error 415 in the browser logs.

  17. Morethanevil commented on Jul 10, 2024

    @Morethanevil
    Author

    I tried it on a different machine from scratch. Above is my dedicated Hetznerserver and now I tried on my homeserver with Fedora 40. But the same error occurs when I use pnpm build

    mte@mtex/apps/docmost$ pnpm build
    
    > [email protected] build /apps/docmost
    > nx run-many -t build
    
    
       ✔  nx run @docmost/editor-ext:build (3s)
    
    ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
       ✖  nx run client:build
          > [email protected] build /apps/docmost/apps/client
          > tsc && vite build
          
          src/features/comment/components/comment-dialog.tsx(38,28): error TS2339: Property 'unsetCommentDecoration' does not exist on type 'ChainedCommands'.
          src/features/comment/components/comment-dialog.tsx(59,10): error TS2551: Property 'setComment' does not exist on type 'ChainedCommands'. Did you mean 'setContent'?
          src/features/comment/components/comment-list-item.tsx(53,24): error TS2339: Property 'unsetComment' does not exist on type 'SingleCommands'.
          src/features/editor/components/bubble-menu/bubble-menu.tsx(27,49): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/bubble-menu/bubble-menu.tsx(89,36): error TS2339: Property 'setCommentDecoration' does not exist on type 'ChainedCommands'.
          src/features/editor/components/callout/callout-menu.tsx(19,29): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/callout/callout-menu.tsx(51,10): error TS2339: Property 'updateCalloutType' does not exist on type 'ChainedCommands'.
          src/features/editor/components/callout/callout-view.tsx(15,29): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/image/image-menu.tsx(50,8): error TS2339: Property 'setImageAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/image-menu.tsx(58,8): error TS2339: Property 'setImageAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/image-menu.tsx(66,8): error TS2339: Property 'setImageAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/image-menu.tsx(75,10): error TS2339: Property 'setImageWidth' does not exist on type 'ChainedCommands'.
          src/features/editor/components/image/upload-image-action.tsx(1,35): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/slash-menu/menu-items.ts(187,12): error TS2339: Property 'insertTable' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(196,51): error TS2339: Property 'toggleDetails' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(213,51): error TS2339: Property 'toggleCallout' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(235,12): error TS2339: Property 'setMathInline' does not exist on type 'ChainedCommands'.
          src/features/editor/components/slash-menu/menu-items.ts(254,51): error TS2339: Property 'setMathBlock' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(8,33): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/table/table-cell-menu.tsx(31,30): error TS2339: Property 'mergeCells' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(35,30): error TS2339: Property 'splitCell' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(39,30): error TS2339: Property 'deleteColumn' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-cell-menu.tsx(43,30): error TS2339: Property 'deleteRow' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(23,33): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/table/table-menu.tsx(52,30): error TS2339: Property 'addColumnBefore' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(56,30): error TS2339: Property 'addColumnAfter' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(60,30): error TS2339: Property 'deleteColumn' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(64,30): error TS2339: Property 'addRowBefore' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(68,30): error TS2339: Property 'addRowAfter' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(72,30): error TS2339: Property 'deleteRow' does not exist on type 'ChainedCommands'.
          src/features/editor/components/table/table-menu.tsx(76,30): error TS2339: Property 'deleteTable' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/upload-video-action.tsx(1,35): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
          src/features/editor/components/video/video-menu.tsx(50,8): error TS2339: Property 'setVideoAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/video-menu.tsx(58,8): error TS2339: Property 'setVideoAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/video-menu.tsx(66,8): error TS2339: Property 'setVideoAlign' does not exist on type 'ChainedCommands'.
          src/features/editor/components/video/video-menu.tsx(75,10): error TS2339: Property 'setVideoWidth' does not exist on type 'ChainedCommands'.
          src/features/editor/extensions/extensions.ts(36,8): error TS2307: Cannot find module '@docmost/editor-ext' or its corresponding type declarations.
           ELIFECYCLE  Command failed with exit code 2.
          
          
       ✔  nx run server:build (8s)
    
    ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
    
     NX   Ran target build for 3 projects (8s)
    
       ✔  2/3 succeeded [0 read from cache]
    
       ✖  1/3 targets failed, including the following:
    
          - nx run client:build
    
     ELIFECYCLE  Command failed with exit code 1.
    mte@mtex/apps/docmost$ lsb_release -a
    LSB Version:    n/a
    Distributor ID: Fedora
    Description:    Fedora Linux 40 (KDE Plasma)
    Release:        40
    Codename:       n/a
    mte@mtex/apps/docmost$ node --version
    v22.4.1
  18. Philipinho commented on Jul 10, 2024

    @Philipinho
    Member

    It seems the custom editor extensions are not being built.

    It has more to do with the client not being able to properly resolve the local @docmost/editor-ext package in your environment. Not yet sure why.

    Can you try starting the client in dev mode?

    cd apps/client
    pnpm dev
    

    It will run on port 5173. Make sure the server is running too.

  19. Morethanevil commented on Jul 11, 2024

    @Morethanevil
    Author

    Running your commands:

    mte@hostname/apps/docmost/apps/client$ pnpm dev
    
    > [email protected] dev /apps/docmost/apps/client
    > vite
    
    The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
    
      VITE v5.3.1  ready in 131 ms
    
      ➜  Local:   http://localhost:5173/
      ➜  Network: use --host to expose
      ➜  press h + enter to show help

    Now I get 404 on my port (8665):
    On Port 5173 I get timeout...

    Response-Headers:

    X-Firefox-Spdy: h2
    access-control-allow-origin: *
    content-length: 63
    content-type: application/json; charset=utf-8
    date: Thu, 11 Jul 2024 13:21:26 GMT
    x-proxy-by: zoraxy/3.0.7
    
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8
    Accept-Encoding: gzip, deflate, br, zstd
    Accept-Language: de,en-US;q=0.7,en;q=0.3
    Connection: keep-alive
    Host: docs.domain.com
    If-Modified-Since: Thu, 11 Jul 2024 13:17:39 GMT
    If-None-Match: W/"299-190a1f139b1"
    Priority: u=0, i
    Sec-Fetch-Dest: document
    Sec-Fetch-Mode: navigate
    Sec-Fetch-Site: none
    Sec-Fetch-User: ?1
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
    
    {"message":"Cannot GET /","error":"Not Found","statusCode":404}
  20. Morethanevil commented on Jul 11, 2024

    @Morethanevil
    Author

    I found a hint maybe... I was testing again on my local machine. When I try IPV6 and Port (http://[fd00::7#########]:8665/) I get an error (page not found), but when I use the IPV4 and port (192.168.0.80:8665), it opens the setup page.

    The dedicated server on Hetzner prefers IPV6 and the reverse proxy is pointing to localhost:port, which prefers IPV6 too. I can not limit the traffic to IPV4 via the reverse proxy, since I have no private IPV4 on the host.

  21. Morethanevil commented on Jul 13, 2024

    @Morethanevil
    Author

    Small update:
    With the newest update (0.2.5) the client is built successfully, but error 415 on the browser stays

  22. Philipinho commented on Jul 14, 2024

    @Philipinho
    Member

    Do you have any server you can replicate this on, where I can have a look?

  23. Morethanevil commented on Jul 14, 2024

    @Morethanevil
    Author

    I could send you the URL of my server for looking into the browser logs, but I don't have a testing server where I could share a SSH connection. I could send you a small video of this if this helps. I wrote you a mail on your address here on Github

  24. Philipinho commented on Jul 22, 2024

    @Philipinho
    Member

    Can you update to v0.2.8 and try again?

  25. Morethanevil commented on Jul 22, 2024

    @Morethanevil
    Author

    Still a blank page, but a new warning at startup:

     pnpm start
    > [email protected] start /apps/docmost
    > pnpm --filter ./apps/server run start:prod
    > [email protected] start:prod /apps/docmost/apps/server
    > cross-env NODE_ENV=production node dist/main
    (node:1607266) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    (Use `node --trace-deprecation ...` to show where the warning was created)
    [Nest] 1607266  - 07/22/2024, 7:16:03 PM     LOG [NestFactory] Starting Nest application...
    [Nest] 1607266  - 07/22/2024, 7:16:03 PM     LOG [DatabaseModule] Establishing database connection
    [Nest] 1607266  - 07/22/2024, 7:16:03 PM     LOG [DatabaseModule] Database connection successful
    [Nest] 1607266  - 07/22/2024, 7:16:03 PM     LOG [DatabaseMigrationService] No pending database migrations
    [Nest] 1607266  - 07/22/2024, 7:16:03 PM     LOG [NestApplication] Nest application successfully started
  26. Philipinho commented on Sep 26, 2024

    @Philipinho
    Member

    Please open a new discussion if you still can’t build locally.

  27. added a commit that references this issue on Dec 24, 2025
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions