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

[BUG] BASE_URL breaks yarn build #1759

Open
5 tasks done
LandStander27 opened this issue Dec 2, 2024 · 0 comments
Open
5 tasks done

[BUG] BASE_URL breaks yarn build #1759

LandStander27 opened this issue Dec 2, 2024 · 0 comments
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working

Comments

@LandStander27
Copy link

LandStander27 commented Dec 2, 2024

Environment

Self-Hosted (Docker)

System

Fedora-Server 6.11.10, Docker 27.3.1

Version

3.1.1

Describe the problem

When starting up the container with BASE_URL not set, (set to ./), the yarn build finishes fine and there are no errors. However, when I have BASE_URL set (/dash) I get a Failed to compile with 1 error.

Going to http://{domain}/dash returns with Error: ENOENT: no such file or directory, stat '/app/dist/index.html'. However, going to the root (http://{domain}/) shows the loading screen.

Additional info

docker-compose.yml

services:
  dashy:
    image: lissy93/dashy:latest
    restart: unless-stopped
    environment:
      - VUE_APP_healthcheck_key=secret
      - VUE_APP_passwd=secret
      - NODE_ENV=production
      - VUE_APP_STARTING_VIEW=home
      - IS_DOCKER=true
      - BASE_URL="/dash"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    ports:
      - 8080:8080
    volumes:
      - secret:/app/user-data/conf.yml

  monitoring:
    image: nicolargo/glances:latest
    restart: always
    pid: host
    build:
      network: host
    privileged: true
    ports:
      - 61208:61208
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/os-release:/etc/os-release:ro
    environment:
      - "GLANCES_OPT=-w"

Parts of the error that seem even somewhat useful (everything else looks like the HTML for the crash page):

This is likely caused by the app source not being found at the current domain

    [app]/[html-minifier]/src/htmlparser.js:240:13
  
  - htmlminifier.js:966 minify
    [app]/[html-minifier]/src/htmlminifier.js:966:3
  
  - htmlminifier.js:1326 exports.minify
    [app]/[html-minifier]/src/htmlminifier.js:1326:16
  
  - index.js:316 
    [app]/[html-webpack-plugin]/index.js:316:18

Please tick the boxes

@LandStander27 LandStander27 added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label Dec 2, 2024
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Dashy V3 Dec 2, 2024
@LandStander27 LandStander27 changed the title [BUG] BASE_URL breaks website build [BUG] BASE_URL breaks yarn build Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working
Projects
Status: Awaiting Triage
Development

No branches or pull requests

2 participants