安装 frappe 时出错:权限被拒绝:"yarn" 在 CentOS 7 上



我正在尝试在VPS上安装ERPNext,并预装了Plesk 7。

在我需要使用此命令的步骤:

bench init --frappe-branch version-12 frappe-bench

我得到这个错误:

[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

我一步一步地遵循本教程:如何在Cents/RHEL|| ERPNext || TechHack Tamil 中安装ERPNext

我有nodejs v10而不是v14或v16,这有问题吗?

提前感谢

在执行命令之前尝试使用sudo

sudo  bench init --frappe-branch version-12 frappe-bench

让我知道的结果

我已经解决了这个问题。

我只是简单地重新安装了纱线,现在它开始工作了。

sudo yum install yarn

我不知道为什么它以前失败了。。。欢迎任何澄清。

最新更新