bench get-app https://github.com/abdoasofi/taakd_app.git
Getting taakd_app
/home/asofi/Benches/bench_academy_v15/env/bin/python -m pip install --quiet --upgrade -e /home/asofi/Benches/bench_academy_v15/apps/taakd_app
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
payments 0.0.1 requires stripe~=2.56.0, but you have stripe 11.0.0 which is incompatible.
$ yarn install --check-files
node:internal/modules/cjs/loader:1148
throw err;
^
Error: Cannot find module '/home/asofi/Benches/bench_academy_v15/apps/taakd_app/.yarn/releases/yarn-1.22.22.cjs'
at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
at Module._load (node:internal/modules/cjs/loader:986:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v20.13.0
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
You're encountering two primary issues while trying to install the taakd_app using Bench:
Pip Dependency Conflict
Yarn Installation Failure
Let's address each problem step-by-step to help you successfully install the app.
1. Pip Dependency Conflict
Error Message:
code
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
payments 0.0.1 requires stripe~=2.56.0, but you have stripe 11.0.0 which is incompatible.
Cause:
The payments package version 0.0.1 requires stripe version ~2.56.0.
Your environment currently has stripe version 11.0.0 installed, which is incompatible with the required version.
Solutions:
A. Use --resolve-deps Flag
The initial log suggests ignoring dependencies and hints to use --resolve-deps to handle dependencies automatically.
The --resolve-deps flag instructs Bench to automatically resolve and install the required dependencies, potentially downgrading or upgrading packages as needed to satisfy all constraints.
B. Manually Adjust Dependencies
If the above doesn't work, you might need to manually adjust the dependencies to resolve the conflict.
Locate requirements.txt:
Navigate to the app directory:
bash
cd /home/asofi/Benches/bench_academy_v15/apps/taakd_app
Open the requirements.txt file.
Specify Compatible stripe Version:
Ensure that the stripe package is set to ~2.56.0:
code
stripe~=2.56.0
OR, if the payments package can be updated to support a newer stripe, consider updating it:
bash
payments>=<version_that_supports_stripe_11.0.0>
Reinstall Dependencies:
bash
pip install --upgrade -r requirements.txt
C. Create an Isolated Virtual Environment
Ensure that your Bench environment is isolated to prevent conflicts with globally installed packages.
The installation process is attempting to use a specific Yarn release (yarn-1.22.22.cjs) which is either missing or not properly installed in the specified directory.
The app might be configured to use a specific Yarn version that isn't present.
Solutions:
A. Install the Required Yarn Version Globally
Check Current Yarn Version:
bash
yarn --version
If Not Installed or Incorrect Version, Install Yarn 1.22.22:
bash
npm install -g yarn@1.22.22
Verify Installation:
bash
yarn --version # Should output 1.22.22
B. Set Up Yarn in the App Directory
If the app expects a local Yarn installation:
Navigate to the App Directory:
bash
cd /home/asofi/Benches/bench_academy_v15/apps/taakd_app
Initialize Yarn:
bash
yarn init -y
Set Specific Yarn Version:
bash
yarn set version 1.22.22
Verify the .yarn/releases Directory:
Ensure that yarn-1.22.22.cjs exists in .yarn/releases/.
If not, the above command should have created it. If it didn't, you might need to manually download it or check the repository for missing files.
C. Reinstall Yarn Dependencies
After ensuring the correct Yarn version is set up:
Clean Yarn Cache:
bash
yarn cache clean
Install Dependencies:
bash
yarn install --check-files
D. Alternative: Use Global Yarn Instead of Local Version
If configuring the local Yarn version is problematic, you can try using the globally installed Yarn:
Remove Local Yarn Configuration:
Delete the .yarn directory in the app if it exists:
Ensure that the Node.js version (v20.13.0) is compatible with the app and Yarn version. Some packages or Yarn versions might have compatibility issues with newer Node.js versions.
Downgrade Node.js if Necessary:
Use nvm (Node Version Manager) to install and switch to a compatible Node.js version, such as v14.x or v16.x:
bash
nvm install 16
nvm use 16
3. Additional Recommendations
A. Clear Bench and System Caches
Sometimes residual caches can cause conflicts.
Clear Pip Cache:
bash
pip cache purge
Clear Yarn Cache:
bash
yarn cache clean
B. Re-clone the Repository
If issues persist, re-cloning the repository might help to ensure all files, especially those related to Yarn, are correctly fetched.
Ensure that you're following any specific installation instructions provided in the taakd_app repository's README or documentation. There might be additional steps or prerequisites required.
D. Contact Repository Maintainer
If after all these steps the issues still aren't resolved, consider opening an issue on the taakd_app GitHub repository detailing the errors you've encountered. The maintainer or community might provide specific insights or fixes.
By following the above steps, you should be able to resolve both the pip dependency conflict and the Yarn installation failure, allowing you to successfully install and run the taakd_app using Bench.
If you encounter further issues, feel free to provide additional logs or context for more targeted assistance.