[notice] A new release of pip is available: 24.0 -> 24.2
[notice] To update, run: /home/asofi/Benches/bench_bonyan_v15/env/bin/python -m pip install --upgrade pip
$ yarn install --check-files
node:internal/modules/cjs/loader:1143
throw err;
^
Error: Cannot find module '/home/asofi/Benches/bench_bonyan_v15/apps/taakd_app/.yarn/releases/yarn-1.22.22.cjs'
at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
at Module._load (node:internal/modules/cjs/loader:981:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v18.20.4
ERROR: yarn install --check-files
subprocess.CalledProcessError: Command 'yarn install --check-files' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/asofi/.local/bin/bench", line 8, in
sys.exit(cli())
File "/home/asofi/.local/lib/python3.10/site-packages/bench/cli.py", line 132, in cli
bench_command()
File "/home/asofi/.local/lib/python3.10/site-packages/bench/commands/make.py", line 181, in get_app
get_app(
File "/home/asofi/.local/lib/python3.10/site-packages/bench/app.py", line 777, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File "/home/asofi/.local/lib/python3.10/site-packages/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
File "/home/asofi/.local/lib/python3.10/site-packages/bench/app.py", line 254, in install
install_app(
File "/home/asofi/.local/lib/python3.10/site-packages/bench/app.py", line 920, in install_app
bench.run(yarn_install, cwd=app_path)
File "/home/asofi/.local/lib/python3.10/site-packages/bench/bench.py", line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File "/home/asofi/.local/lib/python3.10/site-packages/bench/utils/init.py", line 178, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: yarn install --check-files
The error you're encountering indicates that the yarn module required by the taakd_app is missing. Specifically, the application is looking for a specific version of Yarn (yarn-1.22.22.cjs) within its own directory structure, and it can't find it. Here's a step-by-step guide to help you resolve this issue:
1. Verify the Presence of .yarn/releases/yarn-1.22.22.cjs
First, navigate to the application directory and check if the required Yarn release file exists.
bash
cd /home/asofi/Benches/bench_bonyan_v15/apps/taakd_app
ls .yarn/releases/
If the yarn-1.22.22.cjs file is missing:
This likely means that the repository does not include the necessary Yarn release files. This could be due to the .yarn directory being ignored in the .gitignore file.
2. Install the Specific Yarn Version Locally
Since the application expects a specific version of Yarn, you can manually set the Yarn version within the app's directory.
bash
cd /home/asofi/Benches/bench_bonyan_v15/apps/taakd_app
yarn set version 1.22.22
Explanation:
This command sets the Yarn version to 1.22.22 locally within the project, downloading the necessary .cjs file into the .yarn/releases/ directory.
3. Re-run the Installation
After setting the correct Yarn version, try running the installation again.
If the initial cloning was successful, navigate to the app directory and run:
bash
yarn install --check-files
4. Alternative: Use Global Yarn Installation
If setting the Yarn version locally doesn't work, or if you prefer using a global installation of Yarn:
Install Yarn Globally:
bash
npm install -g yarn@1.22.22
Verify the Installation:
bash
yarn --version
# Should output 1.22.22
Run the Installation Again:
bash
cd /home/asofi/Benches/bench_bonyan_v15/apps/taakd_app
yarn install --check-files
5. Check Repository for Installation Instructions
Ensure that the taakd_app repository includes any specific installation instructions or setup scripts. Sometimes, applications require additional steps that aren't immediately apparent.
6. Update Pip as Suggested
Although not directly related to the Yarn error, it's a good practice to keep your Python packages up to date.
Ensure that the .yarn directory isn't being ignored in a way that prevents necessary files from being cloned.
Contact Repository Owner:
If the problem continues, consider opening an issue on the taakd_app GitHub repository to inform the maintainers about the missing Yarn release files.
Summary
The core issue is that the application expects a specific Yarn release file that isn't present in the cloned repository. By setting the correct Yarn version locally or ensuring Yarn is correctly installed globally, you should be able to resolve the MODULE_NOT_FOUND error and successfully install the dependencies for taakd_app.
If you continue to face issues, providing more context or reaching out to the repository maintainers can help in diagnosing the problem further.