[GH-ISSUE #2301] [Bug]: yarn/node/vite issue starting up development container #42559

Closed
opened 2026-04-26 02:30:52 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @jaarasys-henria on GitHub (Jan 29, 2024).
Original GitHub issue: https://github.com/actualbudget/actual/issues/2301

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I have checked my server logs and could not see any errors there
  • I will be attaching my server logs to this issue
  • I will be attaching my client-side (browser) logs to this issue
  • I understand that this issue will be automatically closed if insufficient information is provided

What happened?

I meant to continue work on PR #1994, but stumbled upon an issue with the Docker-based development setup.

Using the provided docker-compose.yml I used to be able to spin up a development server without issues by just running docker compose up --build. With current master branch @ commit 43ebe9e0 there's an error spinning up the container, which I believe originates from yarn attempting to run vite.

Docker version 25.0.1, build 29cf629

Any help would be much appreciated.

What error did you receive?

docker compose up --build
[+] Building 0.0s (7/7) FINISHED                                                                                                                           docker:default
 => [actual-development internal] load build definition from Dockerfile                                                                                              0.0s
 => => transferring dockerfile: 457B                                                                                                                                 0.0s
 => [actual-development internal] load metadata for docker.io/library/node:18-bullseye                                                                               0.0s
 => [actual-development internal] load .dockerignore                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                      0.0s
 => [actual-development 1/3] FROM docker.io/library/node:18-bullseye                                                                                                 0.0s
 => CACHED [actual-development 2/3] RUN apt-get update -y && apt-get upgrade -y && apt-get install -y openssl                                                        0.0s
 => CACHED [actual-development 3/3] WORKDIR /app                                                                                                                     0.0s
 => [actual-development] exporting to image                                                                                                                          0.0s
 => => exporting layers                                                                                                                                              0.0s
 => => writing image sha256:1f3fbe74fddbfb193352ac95bc2d2eaf971c822400126ffd5dd0b0174886a440                                                                         0.0s
 => => naming to docker.io/library/actual-development                                                                                                                0.0s
[+] Running 1/0
 ✔ Container actual-actual-development-1  Created                                                                                                                    0.0s 
Attaching to actual-development-1
actual-development-1  | Usage Error: Couldn't find a script named "webpack".
actual-development-1  | 
actual-development-1  | $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
actual-development-1  | node:events:495
actual-development-1  |       throw er; // Unhandled 'error' event
actual-development-1  |       ^
actual-development-1  | 
actual-development-1  | Error: spawn vite ENOENT
actual-development-1  |     at ChildProcess._handle.onexit (node:internal/child_process:284:19)
actual-development-1  |     at onErrorNT (node:internal/child_process:477:16)
actual-development-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
actual-development-1  | Emitted 'error' event on ChildProcess instance at:
actual-development-1  |     at ChildProcess._handle.onexit (node:internal/child_process:290:12)
actual-development-1  |     at onErrorNT (node:internal/child_process:477:16)
actual-development-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
actual-development-1  |   errno: -2,
actual-development-1  |   code: 'ENOENT',
actual-development-1  |   syscall: 'spawn vite',
actual-development-1  |   path: 'vite',
actual-development-1  |   spawnargs: []
actual-development-1  | }
actual-development-1  | 
actual-development-1  | Node.js v18.18.2
actual-development-1  | ERROR: "start:browser-backend" exited with 1.
actual-development-1 exited with code 1+

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

No response

Operating System

Linux

Originally created by @jaarasys-henria on GitHub (Jan 29, 2024). Original GitHub issue: https://github.com/actualbudget/actual/issues/2301 ### Verified issue does not already exist? - [X] I have searched and found no existing issue ### Is this related to GoCardless, Simplefin or another bank-sync provider? - [ ] I have checked my server logs and could not see any errors there - [x] I will be attaching my server logs to this issue - [ ] I will be attaching my client-side (browser) logs to this issue - [x] I understand that this issue will be automatically closed if insufficient information is provided ### What happened? I meant to continue work on PR #1994, but stumbled upon an issue with the Docker-based development setup. Using the provided `docker-compose.yml` I used to be able to spin up a development server without issues by just running `docker compose up --build`. With current master branch @ commit 43ebe9e0 there's an error spinning up the container, which I believe originates from `yarn` attempting to run `vite`. ``` Docker version 25.0.1, build 29cf629 ``` Any help would be much appreciated. ### What error did you receive? ``` docker compose up --build [+] Building 0.0s (7/7) FINISHED docker:default => [actual-development internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 457B 0.0s => [actual-development internal] load metadata for docker.io/library/node:18-bullseye 0.0s => [actual-development internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [actual-development 1/3] FROM docker.io/library/node:18-bullseye 0.0s => CACHED [actual-development 2/3] RUN apt-get update -y && apt-get upgrade -y && apt-get install -y openssl 0.0s => CACHED [actual-development 3/3] WORKDIR /app 0.0s => [actual-development] exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:1f3fbe74fddbfb193352ac95bc2d2eaf971c822400126ffd5dd0b0174886a440 0.0s => => naming to docker.io/library/actual-development 0.0s [+] Running 1/0 ✔ Container actual-actual-development-1 Created 0.0s Attaching to actual-development-1 actual-development-1 | Usage Error: Couldn't find a script named "webpack". actual-development-1 | actual-development-1 | $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ... actual-development-1 | node:events:495 actual-development-1 | throw er; // Unhandled 'error' event actual-development-1 | ^ actual-development-1 | actual-development-1 | Error: spawn vite ENOENT actual-development-1 | at ChildProcess._handle.onexit (node:internal/child_process:284:19) actual-development-1 | at onErrorNT (node:internal/child_process:477:16) actual-development-1 | at process.processTicksAndRejections (node:internal/process/task_queues:82:21) actual-development-1 | Emitted 'error' event on ChildProcess instance at: actual-development-1 | at ChildProcess._handle.onexit (node:internal/child_process:290:12) actual-development-1 | at onErrorNT (node:internal/child_process:477:16) actual-development-1 | at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { actual-development-1 | errno: -2, actual-development-1 | code: 'ENOENT', actual-development-1 | syscall: 'spawn vite', actual-development-1 | path: 'vite', actual-development-1 | spawnargs: [] actual-development-1 | } actual-development-1 | actual-development-1 | Node.js v18.18.2 actual-development-1 | ERROR: "start:browser-backend" exited with 1. actual-development-1 exited with code 1+ ``` ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? _No response_ ### Operating System Linux
GiteaMirror added the bug label 2026-04-26 02:30:52 -05:00
Author
Owner

@jaarasys-henria commented on GitHub (Jan 30, 2024):

This behavior is introduced by d5359a96. Prior commit 3eee0b11 works as before.

<!-- gh-comment-id:1917575015 --> @jaarasys-henria commented on GitHub (Jan 30, 2024): This behavior is introduced by d5359a96. Prior commit 3eee0b11 works as before.
Author
Owner

@twk3 commented on GitHub (Jan 30, 2024):

@jaarasys-henria thanks for calling out this workflow. There is a bug here. Fixed by https://github.com/actualbudget/actual/pull/2304

But from your error you also need to remove your node_modules directory to get the new dependencies. The current docker dev scripts for actual only install the dependencies once, when it sees that directory as empty. So to get ANY new dependencies you currently need to remove that directory to get the dependency install to happen again.

<!-- gh-comment-id:1917583521 --> @twk3 commented on GitHub (Jan 30, 2024): @jaarasys-henria thanks for calling out this workflow. There is a bug here. Fixed by https://github.com/actualbudget/actual/pull/2304 But from your error you also need to remove your `node_modules` directory to get the new dependencies. The current docker dev scripts for actual only install the dependencies once, when it sees that directory as empty. So to get ANY new dependencies you currently need to remove that directory to get the dependency install to happen again.
Author
Owner

@jaarasys-henria commented on GitHub (Jan 30, 2024):

@jaarasys-henria thanks for calling out this workflow. There is a bug here. Fixed by #2304

But from your error you also need to remove your node_modules directory to get the new dependencies. The current docker dev scripts for actual only install the dependencies once, when it sees that directory as empty. So to get ANY new dependencies you currently need to remove that directory to get the dependency install to happen again.

Thanks for the node_modules advice! FWIW confirming that I can run without issues after removing node_modules directory and incorporating the fixes from #2304. Cheers!

Is the node_modules removal advice documented somewhere? If not, it might be a good idea to include it in for example CONTRIBUTING.md for others like me, who wish to contribute, but aren't that well versed in JS tool chain ecosystem.

<!-- gh-comment-id:1917595676 --> @jaarasys-henria commented on GitHub (Jan 30, 2024): > @jaarasys-henria thanks for calling out this workflow. There is a bug here. Fixed by #2304 > > But from your error you also need to remove your `node_modules` directory to get the new dependencies. The current docker dev scripts for actual only install the dependencies once, when it sees that directory as empty. So to get ANY new dependencies you currently need to remove that directory to get the dependency install to happen again. Thanks for the node_modules advice! FWIW confirming that I can run without issues after removing `node_modules` directory and incorporating the fixes from #2304. Cheers! Is the `node_modules` removal advice documented somewhere? If not, it might be a good idea to include it in for example `CONTRIBUTING.md` for others like me, who wish to contribute, but aren't that well versed in JS tool chain ecosystem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#42559