Note: I’m using Docker Development in Container setup
I’m trying to setup the ERPNext-15 in my local machine. here the command i used
git clone https://github.com/frappe/frappe_docker.git
cd frappe_docker
cp -R devcontainer-example .devcontainer
cp -R development/vscode-example development/.vscode
nvm use v18
After this running this command
PYENV_VERSION=3.10.13 bench init --skip-redis-config-generation --frappe-branch version-15 frappe-bench
I’m getting this error
frappe@e6e16fa7d055:/workspace/development$ PYENV_VERSION=3.10.13 bench init --skip-redis-config-generation --frappe-branch version-15 frappe-bench
Setting Up Environment
$ python3 -m venv env
$ /workspace/development/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
$ /workspace/development/frappe-bench/env/bin/python -m pip install --quiet wheel
Traceback (most recent call last):
File "/home/frappe/.bench/bench/utils/__init__.py", line 73, in is_valid_frappe_branch
res = g.ls_remote("--heads", "--tags", frappe_path, frappe_branch)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/.local/lib/python3.11/site-packages/git/cmd.py", line 736, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/.local/lib/python3.11/site-packages/git/cmd.py", line 1316, in _call_process
return self.execute(call, **exec_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/.local/lib/python3.11/site-packages/git/cmd.py", line 1111, in execute
raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git ls-remote --heads --tags https://github.com/frappe/frappe.git version-15
stderr: 'fatal: unable to access 'https://github.com/frappe/frappe.git/': Could not resolve host: github.com'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/frappe/.bench/bench/commands/make.py", line 68, in init
init(
File "/home/frappe/.bench/bench/utils/render.py", line 105, in wrapper_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/frappe/.bench/bench/utils/system.py", line 78, in init
is_valid_frappe_branch(frappe_path=frappe_path, frappe_branch=frappe_branch)
File "/home/frappe/.bench/bench/utils/__init__.py", line 79, in is_valid_frappe_branch
raise InvalidRemoteException(f"Invalid frappe path: {frappe_path}") from e
bench.exceptions.InvalidRemoteException: Invalid frappe path: https://github.com/frappe/frappe.git
ERROR: There was a problem while creating frappe-bench
Do you want to rollback these changes? [y/N]: y
INFO: Rolling back Bench "frappe-bench"
or sometimes im getting this error
frappe@e6e16fa7d055:/workspace/development$ PYENV_VERSION=3.10.13 bench init --skip-redis-config-generation --frappe-branch version-15 frappe-bench
Setting Up Environment
$ python3 -m venv env
$ /workspace/development/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fb0327f3f70>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/
$ /workspace/development/frappe-bench/env/bin/python -m pip install --quiet wheel
Getting frappe
$ git clone https://github.com/frappe/frappe.git --branch version-15 --depth 1 --origin upstream
Cloning into 'frappe'...
remote: Enumerating objects: 3263, done.
remote: Counting objects: 100% (3263/3263), done.
remote: Compressing objects: 100% (2875/2875), done.
remote: Total 3263 (delta 426), reused 1633 (delta 275), pack-reused 0
Receiving objects: 100% (3263/3263), 17.92 MiB | 2.32 MiB/s, done.
Resolving deltas: 100% (426/426), done.
Installing frappe
$ /workspace/development/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /workspace/development/frappe-bench/apps/frappe
$ yarn install
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.14.tgz: getaddrinfo EAI_AGAIN registry.yarnpkg.com".
info If you think this is a bug, please open a bug report with the information provided in "/workspace/development/frappe-bench/apps/frappe/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
subprocess.CalledProcessError: Command 'yarn install' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/frappe/.bench/bench/commands/make.py", line 68, in init
init(
File "/home/frappe/.bench/bench/utils/render.py", line 105, in wrapper_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/frappe/.bench/bench/utils/system.py", line 79, in init
get_app(
File "/home/frappe/.bench/bench/app.py", line 444, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File "/home/frappe/.bench/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/frappe/.bench/bench/app.py", line 242, in install
install_app(
File "/home/frappe/.bench/bench/app.py", line 581, in install_app
bench.run("yarn install", cwd=app_path)
File "/home/frappe/.bench/bench/bench.py", line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/.bench/bench/utils/__init__.py", line 158, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: yarn install
ERROR: There was a problem while creating frappe-bench
Do you want to rollback these changes? [y/N]: y
INFO: Rolling back Bench "frappe-bench"