Skip to content

🐛(frontend) fix bind-mount hiding node_modules #206

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexgarden92160
Copy link

@alexgarden92160 alexgarden92160 commented Jun 4, 2025

Narrow the bind-mount to ./src/frontend/apps/drive so that the node_modules folder created during the image build remains available inside the container. Solves: /bin/sh: next: not found when running make run-with-frontend.

Closes: #189


Purpose

Running the project with make run-with-frontend made the container
drive-frontend-dev-1 exit immediately:

$ next dev
/bin/sh: next: not found

The full ./src/frontend → /home/frontend/ bind-mount hid the
node_modules directory produced during the Docker build stage, removing
node_modules/.bin/next from the container’s PATH.


Proposal

Bind-mount only the sources that need hot reload (apps/drive) and
stop masking the dependencies installed in the image.

# docker-compose.yml — service frontend-dev
volumes:
-  - ./src/frontend/:/home/frontend/
+  - ./src/frontend/apps/drive:/home/frontend/apps/drive

Narrow the bind-mount to ./src/frontend/apps/drive so that the node_modules
folder created during the image build remains available inside the container.
Solves: /bin/sh: next: not found when running make run-with-frontend.

Signed-off-by: Alexandre Garden <[email protected]>
@alexgarden92160 alexgarden92160 force-pushed the fix/frontend-dev-bind-mount branch from de82d0b to 84dc3b8 Compare June 5, 2025 10:52
@alexgarden92160 alexgarden92160 changed the title 🔧(frontend) fix bind-mount hiding node_modules 🐛(frontend) fix bind-mount hiding node_modules Jun 5, 2025
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

Successfully merging this pull request may close these issues.

drive-frontend-dev-1 container exits: missing next binary during dev startup
1 participant