The new module is not showing on ERPnext Desk?

Hello

I have created a new app called Travel and I want to be included within the erpnext other modules in the same desk

I run this command:

bench frappe erpnext --install_app  Travel

But it says:

frappe app is not installed. Run the following command to install frappe
bench get-app frappe https://github.com/frappe/frappe.git
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/ubuntu/bench-repo/bench/cli.py", line 42, in cli
    return old_frappe_cli()
  File "/home/ubuntu/bench-repo/bench/cli.py", line 91, in old_frappe_cli
    os.execv(f, [f] + sys.argv[2:])
OSError: [Errno 2] No such file or directory

the new module is now in
frappe-bench/apps/

inside apps i run this:

cd apps

and this the result
erpnext frappe travel

Old bench commands are out. Please wait for updated tutorial later today.

Ok, and really thanks for your responding

Thanks for the update … but I’m still have a problem with letting the new module Travel to be appear in the default erpnext site along with the other modules

bench --site site1.local  install_app travel

I tried this commands and it says: Error: No such command “install_app”.

Should it to be:

bench install-app travel

because when I try the second one It give me error: ImportError: No module named Travel

but I’m sure the new module app is exist in the app folder: travel

This is what I have done … I’m using Amazon AWS server to see the output

ubuntu@ip-172-31-29-57:~$ bench install-app travel

this is the error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 77, in <module>
    main()
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 14, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/commands.py", line 28, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/commands.py", line 157, in install_app
    frappe.init(site=site)
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/__init__.py", line 128, in init
    setup_module_map()
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/__init__.py", line 676, in setup_module_map
    for module in get_module_list(app):
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/__init__.py", line 588, in get_module_list
    return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), "modules.txt"))
  File "/home/ubuntu/frappe-bench/apps/frappe/frappe/__init__.py", line 547, in get_module
    return importlib.import_module(modulename)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)

ImportError: No module named Travel

@NadaGh fixed doc

For your error, did you do bench get-app first?

You mean this command ?

bench get-app erpnext https://github.com/frappe/erpnext

I just run it now , and it give this error

fatal: destination path 'erpnext' already exists and is not an empty directory.
Error: None
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/ubuntu/bench-repo/bench/cli.py", line 55, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/bench-repo/bench/cli.py", line 167, in get_app
    _get_app(name, git_url, branch=branch)
  File "/home/ubuntu/bench-repo/bench/app.py", line 52, in get_app
    cwd=os.path.join(bench, 'apps'))
  File "/home/ubuntu/bench-repo/bench/utils.py", line 72, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git clone https://github.com/frappe/erpnext  --depth 1 --origin upstream erpnext' returned non-zero exit status 128
ubuntu@ip-172-31-29-57:~/frappe-bench/apps/erpnext$ bench install-app travel
Installing travel...
Already installed

even this one:

bench  --site site1.local install-app travel
Installing travel...
Already installed

finally it says Already installed
but it is not showing on my desk ?? Why ?
I have created a role and one doc type from the core in the erpnext interface
and it showing that there is a module called Travel
even from show/hide module it is checked and appeared there
but why it is not on the desk ??
(Using V5)

@NadaGh even if the update fails, it may show already installed.

You can try doing

bench remove-from-installed-apps travel

and try installing again

solved my problem , thanks