I am trying to install ERPNext on a VPS with CentOS 7 and Plesk Pre-installed.
At the step where I need to use this command:
bench init --frappe-branch version-12 frappe-bench
I get this error:
[frappe@musing-carver npm]$ bench init --frappe-branch version-12 frappe-bench
$ /usr/local/bin/virtualenv --quiet env -p python3
$ /usr/lib/node_modules/npm/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
Getting frappe
$ git clone https://github.com/frappe/frappe.git --branch version-12 --origin upstream
Cloning into 'frappe'...
remote: Enumerating objects: 318014, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 318014 (delta 0), reused 0 (delta 0), pack-reused 318013
Receiving objects: 100% (318014/318014), 299.62 MiB | 25.33 MiB/s, done.
Resolving deltas: 100% (243376/243376), done.
Installing frappe
$ /usr/lib/node_modules/npm/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /usr/lib/node_modules/npm/frappe-bench/apps/frappe
$ yarn install
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/bench/commands/make.py", line 83, in init
verbose=verbose,
File "/usr/local/lib/python3.6/site-packages/bench/utils/render.py", line 95, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/bench/utils/system.py", line 79, in init
frappe_path, branch=frappe_branch, bench_path=path, skip_assets=True, verbose=verbose
File "/usr/local/lib/python3.6/site-packages/bench/app.py", line 355, in get_app
app.install(verbose=verbose, skip_assets=skip_assets)
File "/usr/local/lib/python3.6/site-packages/bench/utils/render.py", line 110, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/bench/app.py", line 187, in install
app=app_name, bench_path=self.bench.name, verbose=verbose, skip_assets=skip_assets,
File "/usr/local/lib/python3.6/site-packages/bench/app.py", line 412, in install_app
bench.run("yarn install", cwd=app_path)
File "/usr/local/lib/python3.6/site-packages/bench/bench.py", line 43, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File "/usr/local/lib/python3.6/site-packages/bench/utils/__init__.py", line 122, in exec_cmd
return_code = subprocess.call(cmd, cwd=cwd, universal_newlines=True, env=env)
File "/usr/lib64/python3.6/subprocess.py", line 287, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'yarn'
ERROR: There was a problem while creating frappe-bench
I was following this tutorial step by step: How To Install ERPNext in CentOS / RHEL || Erpnext || TechHack Tamil
I have nodejs v10 instead of v14 or v16, ¿is this a problem?
Thank you in advance
CodePudding user response:
try to use sudo before execute the command
sudo bench init --frappe-branch version-12 frappe-bench
let me know the result
CodePudding user response:
I have solved the problem.
I simply reinstalled yarn and now it is working.
sudo yum install yarn
I don't know exactly why it was failing before... any clarification will be welcome.