Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Immich
  3. admin-cli: Error: Cannot find module '/app/code/server/dist/main'

admin-cli: Error: Cannot find module '/app/code/server/dist/main'

Scheduled Pinned Locked Moved Immich
7 Posts 2 Posters 580 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • semaphorS Offline
    semaphorS Offline
    semaphor
    wrote on last edited by
    #1

    Using admin-cli in the web terminal to manage users gives me the following error. Tried it on my own instance (Cloudron 9.0.13) and also on https://my.demo.cloudron.io.

    root@63c6cef5-3440-49e7-91e6-b2ec6bc7ca69:/usr/src/app# admin-cli
    node:internal/modules/cjs/loader:1386
      throw err;
      ^
    
    Error: Cannot find module '/app/code/server/dist/main'
        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: []
    }
    
    Node.js v22.20.0
    
    1 Reply Last reply
    1
    • jamesJ Offline
      jamesJ Offline
      james
      Staff
      wrote on last edited by
      #2

      Hello @semaphor

      I have reproduced this issue and I am working on a fix.

      1 Reply Last reply
      1
      • jamesJ Offline
        jamesJ Offline
        james
        Staff
        wrote on last edited by
        #3

        Hello @semaphor
        If you need this admin tool right now urgently, you can run the following commands:

        source /app/pkg/env.sh
        gosu cloudron:cloudron node /usr/src/app/server/dist/main immich-admin --help
        

        and you will get:

        Missing history for endpoint: Retrieve auth status
        (node:330) ExperimentalWarning: WASI is an experimental feature and might change at any time
        (Use `node --trace-warnings ...` to show where the warning was created)
        Usage: main [options] [command]
        
        Options:
          -h, --help                display help for command
        
        Commands:
          reset-admin-password      Reset the admin password
          enable-password-login     Enable password login
          disable-password-login    Disable password login
          enable-maintenance-mode   Enable maintenance mode or regenerate the maintenance token
          disable-maintenance-mode  Disable maintenance mode
          enable-oauth-login        Enable OAuth login
          disable-oauth-login       Disable OAuth login
          list-users                List Immich users
          version                   Print Immich version
          grant-admin               Grant admin privileges to a user (by email)
          revoke-admin              Revoke admin privileges from a user (by email)
          change-media-location     Change database file paths to align with a new media location
          help [command]            display help for command
        
        1 Reply Last reply
        1
        • jamesJ Offline
          jamesJ Offline
          james
          Staff
          wrote on last edited by
          #4

          An app update and documentation update will be available soon.

          1 Reply Last reply
          1
          • semaphorS Offline
            semaphorS Offline
            semaphor
            wrote on last edited by semaphor
            #5

            Works. Thank you very much! ✨ That was quick 😊

            Btw I also found what I was looking for: A user freshly created in Immich (logged in for the first time via OAuth) couldn't upload files. immich-admin list-users showed quotaSizeInBytes: 0 for them. Which is correct behaviour according to:

            cat /run/immich.json 
            ...
              "oauth": {
            ...
                "defaultStorageQuota": 0,
            ...
            

            Looking at the current default immich.json it shoud be "defaultStorageQuota": null.

            Is starting with no quota intended behaviour for Immich on Cloudron? I just can't remember if I used the admin to set a quota manually on previously generated users.

            1 Reply Last reply
            2
            • jamesJ Offline
              jamesJ Offline
              james
              Staff
              wrote on last edited by james
              #6

              Hello @semaphor

              Remarkable how no one reported this so far. I am not sure if this is intended.
              But it has been like that since 3 May 2024, so maybe everyone that uses the Cloudron app just took it as expected default?
              Indeed, it should be null instead of 0 for no quota, which I just tested.
              I will add this to the upcoming app update as well.

              1 Reply Last reply
              1
              • semaphorS Offline
                semaphorS Offline
                semaphor
                wrote on last edited by
                #7

                Hello @james, and thank you! 😎
                Remarkable indeed. As I don't know anything about the number of Cloudron instances, their respective user counts etc., I could only make wild assumptions. But guess immich is quite popular. (Perhaps lots of people set a default storage quota in their configuration? Or maybe having a local config was obligatory at some point? Or most just adjust the quota for every user individually?)

                1 Reply Last reply
                1

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search