Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start container #1074

Closed
Havock94 opened this issue Jan 25, 2024 · 4 comments
Closed

Cannot start container #1074

Havock94 opened this issue Jan 25, 2024 · 4 comments

Comments

@Havock94
Copy link

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
Copy link
Author

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

@lpgera
Copy link
Owner

lpgera commented Jan 25, 2024

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
Copy link
Owner

lpgera commented Jan 25, 2024

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

Luckily it's an easy fix.

@lpgera
Copy link
Owner

lpgera commented Jan 25, 2024

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

@lpgera lpgera closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants