Cloning and Installing remote repository changes into local system
Please anyone can help me to clone and install a remote repository into my local system.
I am good at cloning and pulling changes from remote repository.
But while I am trying to install that apps into my site , I am getting errors.
please help me to fix this.
Hello @Kiranmai,
To get any app, use the following command:
bench get-app --branch git-branch git_app_path
// Example
bench get-app --branch version-15 https://github.com/frappe/erpnext.git
For app installation on a specific site, use:
bench --site your_sitename.com install-app erpnext
To update the erpnext app, navigate to the app directory and execute:
git pull upstream version-15
Ensure that you set the version as per the app requirements.
Here are some references for your guidance:
I hope this information proves helpful.
Thank You!
@NCP
I need install app which is cloned from a remote repository.
Example :
-
Cloning that repo into our local sytem.
â> git clone GitHub - amreenfatim/Hilltop -
cd Hilltop/
-
git fetch
-
git merge origin/main
-
git pull origin main
-
bench update --pull
-
bench --site hilltop install-app hilltop
These are the steps followed to clone and install app from remote repository.
But iam getting error at 7 .
That error is : ` bench --site hilltop install-app Hilltop
Could not find app âHilltopâ:
No module named âHilltopâ
An error occurred while installing Hilltop: No module named âHilltopâ
Traceback with variables (most recent call last):
File âapps/frappe/frappe/commands/site.pyâ, line 462, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {âsitesâ: [âhilltopâ], âforceâ: False, âverboseâ: False, âprofileâ: False}
apps = (âHilltopâ,)
force = False
_install_app = <function install_app at 0x7f1f65978900>
filelock = <function filelock at 0x7f1f6760b2e0>
exit_code = 0
site = âhilltopâ
app = âHilltopâ
err = ModuleNotFoundError(âNo module named âHilltopââ)
File âapps/frappe/frappe/installer.pyâ, line 266, in install_app
app_hooks = frappe.get_hooks(app_name=name)
name = âHilltopâ
verbose = False
set_as_patched = True
force = False
sync_jobs = <function sync_jobs at 0x7f1f64a1dbc0>
sync_for = <function sync_for at 0x7f1f64a1ea20>
sync_customizations = <function sync_customizations at 0x7f1f65a8ade0>
sync_fixtures = <function sync_fixtures at 0x7f1f64a1ede0>
File âapps/frappe/frappe/init.pyâ, line 1570, in get_hooks
hooks = _dict(_load_app_hooks(app_name))
hook = None
default = â_KEEP_DEFAULT_LISTâ
app_name = âHilltopâ
File âapps/frappe/frappe/utils/caching.pyâ, line 57, in wrapper
return_val = func(*args, **kwargs)
args = (âHilltopâ,)
kwargs = {}
args_key = ********
func = <function _load_app_hooks at 0x7f1f65fa5f80>
File âapps/frappe/frappe/init.pyâ, line 1542, in _load_app_hooks
app_hooks = get_module(f"{app}.hooks")
app_name = âHilltopâ
hooks = {}
apps = [âHilltopâ]
app = âHilltopâ
types = <module âtypesâ from â/usr/lib/python3.11/types.pyâ>
File âapps/frappe/frappe/init.pyâ, line 1408, in get_module
return importlib.import_module(modulename)
modulename = âHilltop.hooksâ
File â/usr/lib/python3.11/importlib/init.pyâ, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
name = âHilltop.hooksâ
package = None
level = 0
File ââ, line 1204, in _gcd_import
name = âHilltop.hooksâ
package = None
level = 0
File ââ, line 1176, in find_and_load
name = âHilltop.hooksâ
import = <function _gcd_import at 0x7f1f6774fd80>
module = Traceback (most recent call last):
File âenv/lib/python3.11/site-packages/traceback_with_variables/core.pyâ, line 222, in to_cropped_str
raw = print(obj)
^^^^^^^^^^^
File âapps/frappe/frappe/utils/init.pyâ, line 329, in dict_printer
if key in v:
^^^^^^^^
TypeError: argument of type âobjectâ is not iterable
File ââ, line 1126, in find_and_load_unlocked
name = âHilltop.hooksâ
import = <function _gcd_import at 0x7f1f6774fd80>
path = None
parent = âHilltopâ
parent_spec = None
File ââ, line 241, in _call_with_frames_removed
f = <function _gcd_import at 0x7f1f6774fd80>
args = (âHilltopâ,)
kwds = {}
File ââ, line 1204, in _gcd_import
name = âHilltopâ
package = None
level = 0
File ââ, line 1176, in find_and_load
name = âHilltopâ
import = <function _gcd_import at 0x7f1f6774fd80>
module = Traceback (most recent call last):
File âenv/lib/python3.11/site-packages/traceback_with_variables/core.pyâ, line 222, in to_cropped_str
raw = print(obj)
^^^^^^^^^^^
File âapps/frappe/frappe/utils/init.pyâ, line 329, in dict_printer
if key in v:
^^^^^^^^
TypeError: argument of type âobjectâ is not iterable
File ââ, line 1140, in find_and_load_unlocked
name = âHilltopâ
import = <function _gcd_import at 0x7f1f6774fd80>
path = None
parent = ââ
parent_spec = None
spec = None
builtins.ModuleNotFoundError: No module named âHilltopâ
`
But i have that module in my local system .
eg : ls
erpnext frappe frappe_whatsapp Hilltop hilltop_custom hrms india_compliance payments pdf_on_submit
Hi @Kiranmai,
Please avoid cloning the application.
If you wish to clone the application, use the âget-appâ command.
bench get-app --branch main https://github.com/amreenfatim/Hilltop.git
This works in a way similar to a clone.
Please again check the documentation.
Thank You!
@NCP I tried that one also.
But no use.
The process i mentioned above is working sometimes.
By using that process i cloned another repository.
But now it is not working.
After Some Research I Just Saw That Your Repository project,toml
needs some fix
Please Accept The Changes Then Use @NCP Instructions.
I Hope it helps.