Launching Uptime Kuma in Portainer fails #1831

Closed
opened 2026-02-28 02:34:03 -05:00 by deekerman · 16 comments
Owner

Originally created by @dtenney on GitHub (Jan 26, 2023).

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

Trying to launch Uptime Kuma within Portainer using the default docker-composer.yml and getting an error message:

==> Performing startup jobs and maintenance tasks
changed ownership of '/app/data' from 1001:users to 0:0
==> Starting application with user 0 group 0
Welcome to Uptime Kuma
node:internal/modules/cjs/loader:998

throw err;
^
Error: Cannot find module 'dayjs'
Require stack:

  • /app/server/server.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/server/server.js:9:15)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/app/server/server.js' ]
    }

Docker compose:
version: '3.3'

services:
uptime-kuma:
image: louislam/uptime-kuma:1
container_name: uptime-kuma
volumes:
- ./uptime-kuma-data:/app/data
ports:
- 3001:3001 # :
restart: always

🐻 Uptime-Kuma Version

1.19.6

💻 Operating System and Arch

Debian GNU/Linux 11

🌐 Browser

Google Chrome Version 109.0.5414.119

🐋 Docker Version

20.10.23

🟩 NodeJS Version

No response

Originally created by @dtenney on GitHub (Jan 26, 2023). ### ⚠️ Please verify that this bug has NOT been raised before. - [X] I checked and didn't find similar issue ### 🛡️ Security Policy - [X] I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/security/policy) ### 📝 Describe your problem Trying to launch Uptime Kuma within Portainer using the default docker-composer.yml and getting an error message: ==> Performing startup jobs and maintenance tasks changed ownership of '/app/data' from 1001:users to 0:0 ==> Starting application with user 0 group 0 Welcome to Uptime Kuma node:internal/modules/cjs/loader:998 throw err; ^ Error: Cannot find module 'dayjs' Require stack: - /app/server/server.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15) at Function.Module._load (node:internal/modules/cjs/loader:841:27) at Module.require (node:internal/modules/cjs/loader:1067:19) at require (node:internal/modules/cjs/helpers:103:18) at Object.<anonymous> (/app/server/server.js:9:15) at Module._compile (node:internal/modules/cjs/loader:1165:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) at Module.load (node:internal/modules/cjs/loader:1043:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/app/server/server.js' ] } Docker compose: version: '3.3' services: uptime-kuma: image: louislam/uptime-kuma:1 container_name: uptime-kuma volumes: - ./uptime-kuma-data:/app/data ports: - 3001:3001 # <Host Port>:<Container Port> restart: always ### 🐻 Uptime-Kuma Version 1.19.6 ### 💻 Operating System and Arch Debian GNU/Linux 11 ### 🌐 Browser Google Chrome Version 109.0.5414.119 ### 🐋 Docker Version 20.10.23 ### 🟩 NodeJS Version _No response_
deekerman 2026-02-28 02:34:03 -05:00
  • closed this issue
  • added the
    Stale
    help
    labels
Author
Owner

@Anexgohan commented on GitHub (Jan 27, 2023):

use this docker-compose.yml

version: '3.3'
services:
  uptime-kuma:
    image: 'louislam/uptime-kuma:1'
    container_name: uptime-kuma
    restart: always
    ports:
      - '3001:3001'
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock    #for docker host support in uptime-kuma
      - /path/to/wherever/uptime-kuma:/app/data    #config and data location for uptime-kuma, also used below to "docker volume create uptime-kuma"
#following is equivelent to docker command "docker volume create uptime-kuma" ,note that "uptime-kuma" is also binded above location
volumes:
  uptime-kuma:
@Anexgohan commented on GitHub (Jan 27, 2023): use this docker-compose.yml ``` version: '3.3' services: uptime-kuma: image: 'louislam/uptime-kuma:1' container_name: uptime-kuma restart: always ports: - '3001:3001' volumes: - /var/run/docker.sock:/var/run/docker.sock #for docker host support in uptime-kuma - /path/to/wherever/uptime-kuma:/app/data #config and data location for uptime-kuma, also used below to "docker volume create uptime-kuma" #following is equivelent to docker command "docker volume create uptime-kuma" ,note that "uptime-kuma" is also binded above location volumes: uptime-kuma: ```
Author
Owner

@louislam commented on GitHub (Jan 27, 2023):

Error: Cannot find module 'dayjs'

That is weird, it shouldn't happen on a container.

I am guessing, the image maybe corrupted?

Try to pull it again:
docker pull louislam/uptime-kuma:1

@louislam commented on GitHub (Jan 27, 2023): > Error: Cannot find module 'dayjs' That is weird, it shouldn't happen on a container. I am guessing, the image maybe corrupted? Try to pull it again: `docker pull louislam/uptime-kuma:1`
Author
Owner

@dtenney commented on GitHub (Jan 27, 2023):

I get the same error with the suggested docker pull and new compose file. I'm wondering if it has something to do with my system's architecture, aarch64. I see several call outs to armv7 throughout the git repo and the error seems to state that the dependencies are not being installed.

@dtenney commented on GitHub (Jan 27, 2023): I get the same error with the suggested docker pull and new compose file. I'm wondering if it has something to do with my system's architecture, aarch64. I see several call outs to armv7 throughout the git repo and the error seems to state that the dependencies are not being installed.
Author
Owner

@louislam commented on GitHub (Jan 27, 2023):

Tested on Oracle Cloud's arm64 machine, it is working.

Because all files should be ready inside the container/image, it should not happen. It is the weird part.

I think you should go inside and see what is inside the image:

docker run --rm -it louislam/uptime-kuma:1 bash
cd /app/
ls
cd /app/node_modules
ls # See if dayjs there

image

@louislam commented on GitHub (Jan 27, 2023): Tested on Oracle Cloud's arm64 machine, it is working. Because all files should be ready inside the container/image, it should not happen. It is the weird part. I think you should go inside and see what is inside the image: ```bash docker run --rm -it louislam/uptime-kuma:1 bash cd /app/ ls cd /app/node_modules ls # See if dayjs there ``` ![image](https://user-images.githubusercontent.com/1336778/215135077-d1326fdb-3310-4103-a555-4d511de4d612.png)
Author
Owner

@dtenney commented on GitHub (Jan 27, 2023):

The dayjs module is there. Running the server.js command directly gives me the error.

root@f32c06877c11:~# cd /app/
root@f32c06877c11:/app# ls
config	data  db  dist	docker	extra  index.html  node_modules  package-lock.json  package.json  public  server  src
root@f32c06877c11:/app# cd /app/node_modules 
root@f32c06877c11:/app/node_modules# ls dayjs
CHANGELOG.md  LICENSE  README.md  dayjs.min.js	esm  index.d.ts  locale  locale.json  package.json  plugin
root@f32c06877c11:/app# node server/server.js 
Welcome to Uptime Kuma
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module 'dayjs'
Require stack:
- /app/server/server.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/app/server/server.js:9:15)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/server/server.js' ]
}
root@f32c06877c11:/app# 
@dtenney commented on GitHub (Jan 27, 2023): The dayjs module is there. Running the server.js command directly gives me the error. ``` root@f32c06877c11:~# cd /app/ root@f32c06877c11:/app# ls config data db dist docker extra index.html node_modules package-lock.json package.json public server src root@f32c06877c11:/app# cd /app/node_modules root@f32c06877c11:/app/node_modules# ls dayjs CHANGELOG.md LICENSE README.md dayjs.min.js esm index.d.ts locale locale.json package.json plugin ``` ``` root@f32c06877c11:/app# node server/server.js Welcome to Uptime Kuma node:internal/modules/cjs/loader:998 throw err; ^ Error: Cannot find module 'dayjs' Require stack: - /app/server/server.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15) at Function.Module._load (node:internal/modules/cjs/loader:841:27) at Module.require (node:internal/modules/cjs/loader:1067:19) at require (node:internal/modules/cjs/helpers:103:18) at Object.<anonymous> (/app/server/server.js:9:15) at Module._compile (node:internal/modules/cjs/loader:1165:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) at Module.load (node:internal/modules/cjs/loader:1043:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/app/server/server.js' ] } root@f32c06877c11:/app# ```
Author
Owner

@louislam commented on GitHub (Jan 27, 2023):

Too strange, what is your hardware? Is your Debian downloaded from official?

@louislam commented on GitHub (Jan 27, 2023): Too strange, what is your hardware? Is your Debian downloaded from official?
Author
Owner

@dtenney commented on GitHub (Jan 27, 2023):

It's an Asustor NAS AS3304T. I've posted a similar question on their forums to see if anyone else has seen something similar. https://forum.asustor.com/viewtopic.php?f=184&t=13643&p=45944#p45944

To add, I have other docker containers running directly from the command line and portainer as well.

@dtenney commented on GitHub (Jan 27, 2023): It's an Asustor NAS AS3304T. I've posted a similar question on their forums to see if anyone else has seen something similar. https://forum.asustor.com/viewtopic.php?f=184&t=13643&p=45944#p45944 To add, I have other docker containers running directly from the command line and portainer as well.
Author
Owner

@dtenney commented on GitHub (Jan 27, 2023):

I tried running npm by itself and got this error:

root@f32c06877c11:/app# npm
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module '../lib/cli.js'
Require stack:
- /usr/local/bin/npm
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/usr/local/bin/npm:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/usr/local/bin/npm' ]
}
@dtenney commented on GitHub (Jan 27, 2023): I tried running npm by itself and got this error: ``` root@f32c06877c11:/app# npm node:internal/modules/cjs/loader:998 throw err; ^ Error: Cannot find module '../lib/cli.js' Require stack: - /usr/local/bin/npm at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15) at Function.Module._load (node:internal/modules/cjs/loader:841:27) at Module.require (node:internal/modules/cjs/loader:1067:19) at require (node:internal/modules/cjs/helpers:103:18) at Object.<anonymous> (/usr/local/bin/npm:2:1) at Module._compile (node:internal/modules/cjs/loader:1165:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) at Module.load (node:internal/modules/cjs/loader:1043:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/usr/local/bin/npm' ] } ```
Author
Owner

@louislam commented on GitHub (Jan 27, 2023):

I guess it maybe a OS issue or a kernel issue.

You should try the node.js image directly.

docker run --rm -it node:16-buster-slim bash
@louislam commented on GitHub (Jan 27, 2023): I guess it maybe a OS issue or a kernel issue. You should try the node.js image directly. ``` docker run --rm -it node:16-buster-slim bash ```
Author
Owner

@dtenney commented on GitHub (Jan 27, 2023):

I am able to run npm on the host itself but it looks like an old version that gets installed.

root@media-nas:/volume1 # npm -v
6.4.1

@dtenney commented on GitHub (Jan 27, 2023): I am able to run npm on the host itself but it looks like an old version that gets installed. root@media-nas:/volume1 # npm -v 6.4.1
Author
Owner

@dtenney commented on GitHub (Jan 27, 2023):

Further digging, I get the error when I use an updated node version v18.x. The base Debian packages run node and npm but uptime kuma doesn't install due to the age of the repository versions. Working to recompile on the host itself and see if that allows me to run the newer version.

@dtenney commented on GitHub (Jan 27, 2023): Further digging, I get the error when I use an updated node version v18.x. The base Debian packages run node and npm but uptime kuma doesn't install due to the age of the repository versions. Working to recompile on the host itself and see if that allows me to run the newer version.
Author
Owner

@louislam commented on GitHub (Jan 27, 2023):

Further digging, I get the error when I use an updated node version v18.x. The base Debian packages run node and npm but uptime kuma doesn't install due to the age of the repository versions. Working to recompile on the host itself and see if that allows me to run the newer version.

So maybe my guessing is correct, it may be a kernel bug of your device. You should provide reproduce steps to Asustor team.

Before that, make sure your Debian's packages are fully updated to the lastest versions.

@louislam commented on GitHub (Jan 27, 2023): > Further digging, I get the error when I use an updated node version v18.x. The base Debian packages run node and npm but uptime kuma doesn't install due to the age of the repository versions. Working to recompile on the host itself and see if that allows me to run the newer version. So maybe my guessing is correct, it may be a kernel bug of your device. You should provide reproduce steps to Asustor team. Before that, make sure your Debian's packages are fully updated to the lastest versions.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 28, 2023):

We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.

@github-actions[bot] commented on GitHub (Apr 28, 2023): We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 30, 2023):

This issue was closed because it has been stalled for 2 days with no activity.

@github-actions[bot] commented on GitHub (Apr 30, 2023): This issue was closed because it has been stalled for 2 days with no activity.
Author
Owner

@dynumo commented on GitHub (Feb 23, 2025):

It's unfortunate this still seems to be an issue with asustor 2 years later. Having the same problem. Do you recall if you found a solution @dtenney ?

@dynumo commented on GitHub (Feb 23, 2025): It's unfortunate this still seems to be an issue with asustor 2 years later. Having the same problem. Do you recall if you found a solution @dtenney ?
Author
Owner

@dtenney commented on GitHub (Feb 23, 2025):

After sending in a request to asustor support and getting nowhere, I decided to run uptime-kuma on a raspberry pi. It also seems that a large chunk of the "apps" asustor provides were created by one person a long time ago and they are all defunct. Example: https://www.asustor.com/en/app_central/app_detail?id=1455&type=

@dtenney commented on GitHub (Feb 23, 2025): After sending in a request to asustor support and getting nowhere, I decided to run uptime-kuma on a raspberry pi. It also seems that a large chunk of the "apps" asustor provides were created by one person a long time ago and they are all defunct. Example: https://www.asustor.com/en/app_central/app_detail?id=1455&type=
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/uptime-kuma#1831
No description provided.