lpgera / dirigera-web

A progressive web app for controlling Dirigera smart home devices.
MIT License
12 stars 0 forks source link

Cannot start container #1074

Closed Havock94 closed 5 months ago

Havock94 commented 5 months ago

Hi! I'm trying to run the container through Portainer stacks, this is my configuration

version: "3"

services:
  dirigera-web:
    image: ghcr.io/lpgera/dirigera-web
    container_name: DirigeraWeb
    env_file: stack.env
    ports:
      - "4000:4000"
    #restart: unless-stopped

(stack.env is what Portainer calls the .env for a stack)

This is how the .env is populated image

When I run it, I cannot access it at port 4000 because it's just crashing, this is the log output I get

start npm run start -w backend start node -r dotenv/config dist/index.js dotenv_config_path=../.env node:internal/modules/cjs/loader:1152 throw err; ^ Error: Cannot find module '/usr/src/app/backend/dist/index.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1149:15) at Module._load (node:internal/modules/cjs/loader:990:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: [] } Node.js v21.6.0 npm ERR! Lifecycle script start failed with error: npm ERR! Error: command failed npm ERR! in workspace: backend npm ERR! at location: /usr/src/app/backend

Is there anything I'm doing wrong? Thanks!

Havock94 commented 5 months ago

PS: I tried starting it with the docker run command but still got the same error output

lpgera commented 5 months ago

Is there anything I'm doing wrong? Thanks!

No, there's indeed something wrong with the latest builds, it's not your fault! I'll be able to look into this later today.

lpgera commented 5 months ago

Seems like there's a breaking change in the latest swc release which broke the startup command of the server: https://github.com/swc-project/swc/issues/8549 https://github.com/swc-project/cli/issues/281

Luckily it's an easy fix.

lpgera commented 5 months ago

Resolved in v2024-01-25.2662. If you pull the latest image again, it'll work fine!