How to add new module stepby step?

ill try to create new module but i had an error?

jun@ubuntu:~$ bench get-app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
INFO:bench.app:getting app erpnext
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/jun/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/jun/.bench/bench/commands/make.py”, line 30, in get_app
get_app(git_url, branch=branch)
File “/home/jun/.bench/bench/app.py”, line 62, in get_app
cwd=os.path.join(bench_path, ‘apps’))
File “/home/jun/.bench/bench/utils.py”, line 119, in exec_cmd
p = subprocess.Popen(cmd, cwd=cwd, shell=True, stdout=stdout, stderr=stderr)
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory: ‘./apps’
jun@ubuntu:~$ bench --site site1.local install_app sample
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/jun/.bench/bench/cli.py”, line 26, in cli
return frappe_cmd()
File “/home/jun/.bench/bench/cli.py”, line 87, in frappe_cmd
os.chdir(os.path.join(bench_path, ‘sites’))
OSError: [Errno 2] No such file or directory: ‘./sites’
jun@ubuntu:~$ bench install-app sample
Usage: bench [OPTIONS] COMMAND [ARGS]…

Error: No such command “install-app”.
jun@ubuntu:~$ bench --site site1.local install_app sample
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/jun/.bench/bench/cli.py”, line 26, in cli
return frappe_cmd()
File “/home/jun/.bench/bench/cli.py”, line 87, in frappe_cmd
os.chdir(os.path.join(bench_path, ‘sites’))
OSError: [Errno 2] No such file or directory: ‘./sites’
jun@ubuntu:~$

Simply goto Module Def doctype and add new!
You have to specify scrubbed_app_name

Edit: login as administrator

hi @fahimalizain ill try but didnt save.?

From the logs you have posted, it looks like you are not creating a module, you are creating an app and trying to install it on the site ?

bench --site [sitename] install-app erpnext

That is the command to install erpnext to your site
Please post more error logs if you cant proceed :slight_smile: