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

The Docker build process for the builder stage fails with a FileNotFoundError for yarn during the bench init step. #1465

Open
calhoward opened this issue Sep 10, 2024 · 1 comment
Labels

Comments

@calhoward
Copy link

calhoward commented Sep 10, 2024

SOLUTION

EDIT: Solution found. I was using a malformed docker build command. This issue may be closed.

Description of the issue

The Docker build process for the builder stage fails with a FileNotFoundError for yarn during the bench init step. This occurs because yarn is not available in the environment during the build process, despite being installed via nvm. The issue arises because the nvm environment isn’t sourced before bench init, so yarn is not added to the PATH.

Context information (for bug reports)

•	Frappe Version: 15
•	Node Version: 18.18.2 (managed by nvm)
•	Yarn Version: Installed through nvm
•	Docker Image Base: python:3.11.6-slim-bookworm

This issue was encountered while building a custom Docker image for Frappe version 15 using the frappe_docker repository. The error prevents the successful completion of the Docker image build.

Steps to reproduce the issue

1.	Use a Dockerfile based on the official frappe_docker repository with Node.js and yarn installed via nvm.
2.	Attempt to build the image using the bench init command in the builder stage.
3.	The build fails during the yarn install step with a FileNotFoundError because yarn is not in the environment.

Observed result

The build fails with the following error message:

Stacktrace / full error message if available

FileNotFoundError: [Errno 2] No such file or directory: 'yarn'

Expected result

The build should complete successfully, with yarn being available during the bench init process.

@calhoward calhoward added the bug label Sep 10, 2024
@calhoward
Copy link
Author

Solution found. I was using a malformed docker build command. This issue may be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant