India compliance error (Invalid "depends_on" expression)

Hi
I have installed the India compliance on my local machine and when I am using the site and going in gst setting it shows me error and the content is blank.


Invalid “depends_on” expression

also when i am opening sales invoice and going in one invoice it shows blank.

image

@Sunil_Kumar1 check your browser console

ReferenceError: gst_settings is not defined
at setup_e_waybill_actions (sales_invoice__js:1857:5)
at eval (sales_invoice__js:3246:1)
at frappe.ui.form.ScriptManager.setup (script_manager.js:186:30)
at frappe.ui.form.Form.setup (form.js:115:23)
at frappe.ui.form.Form.refresh (form.js:429:10)
at frappe.views.FormFactory.render (formview.js:107:45)
at formview.js:91:9
at Object.callback (model.js:327:19)
at Object.e [as success_callback] (request.js:85:16)
at 200 (request.js:133:34)

I think this is creating issue how can I resolve this

@Sunil_Kumar1 check this GST Settings - enable_e_invoice · Issue #581 · resilient-tech/india-compliance · GitHub

tried this but did not help.

frappe@16b56203c6f6:~/frappe-bench$ bench build --app india_compliance
✔ Application Assets Linked


yarn run v1.22.22
$ node esbuild --production --apps india_compliance --run-build-command
 ERROR  There were some problems during build

TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:405:5)
    at validateString (node:internal/validators:162:11)
    at Object.resolve (node:path:1097:7)
    at get_all_files_to_build (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:192:9)
    at build_assets_for_apps (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:134:5)
    at execute (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:104:19)
    at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:89:1)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
Terminated
error Command failed with exit code 143.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/utils.py", line 77, in build
    bundle(
  File "/home/frappe/frappe-bench/apps/frappe/frappe/build.py", line 254, in bundle
    frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 97, in popen
    raise subprocess.CalledProcessError(return_, command)
subprocess.CalledProcessError: Command 'yarn run production --apps india_compliance --run-build-command' returned non-zero exit status 143.

@Sunil_Kumar1 If you have a manual installation, it’s best to update versions with bench update

In bench update getting this error and I am using docker.

C:\Users\dme\Desktop\Data\docker\frappe>docker exec -it pwd-backend-1 bash
frappe@16b56203c6f6:~/frappe-bench$ bench update
ERROR: Command 'git symbolic-ref -q --short HEAD' returned non-zero exit status 128.
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.11/site-packages/bench/cli.py", line 132, in cli
    bench_command()
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bench/commands/update.py", line 59, in update
    update(
  File "/usr/local/lib/python3.11/site-packages/bench/utils/bench.py", line 457, in update
    validate_branch()
  File "/usr/local/lib/python3.11/site-packages/bench/utils/bench.py", line 644, in validate_branch
    branch = get_current_branch(app)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bench/utils/app.py", line 175, in get_current_branch
    return get_cmd_output("git symbolic-ref -q --short HEAD", cwd=repo_dir)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bench/utils/__init__.py", line 237, in get_cmd_output
    output = subprocess.check_output(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'git symbolic-ref -q --short HEAD' returned non-zero exit status 128.

@Sunil_Kumar1 check this Bench Update not working in Docker - #3 by SunilBGovind

Hi @Sunil_Kumar1 Is this issue solved? I am facing the same issue

Refer: GST Settings Page - Invalid "depends_on" expression · Issue #625 · resilient-tech/india-compliance · GitHub

frappe@f2f3677feae1:~/frappe-bench/apps$ bench get-app verp_staffing \
https://git.vrugle.com/Vrugle/verp_staffing.git \
--branch release/v0.0.1
Getting verp_staffing
$ git clone https://git.vrugle.com/Vrugle/verp_staffing.git --branch release/v0.0.1  --origin upstream
Cloning into 'verp_staffing'...
Username for 'https://git.vrugle.com': Vrugle
Password for 'https://Vrugle@git.vrugle.com': 
remote: Enumerating objects: 1033, done.
remote: Counting objects: 100% (1033/1033), done.
remote: Compressing objects: 100% (1007/1007), done.
remote: Total 1033 (delta 639), reused 0 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (1033/1033), 683.15 KiB | 2.96 MiB/s, done.
Resolving deltas: 100% (639/639), done.
Ignoring dependencies of https://git.vrugle.com/Vrugle/verp_staffing.git. To install dependencies use --resolve-deps
Installing verp_staffing
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/verp_staffing 
$ bench build --app verp_staffing
✔ Application Assets Linked                                                                                                                                                 


yarn run v1.22.22
$ node esbuild --production --apps verp_staffing --run-build-command
 ERROR  There were some problems during build

TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined
    at Object.resolve (node:path:1187:7)
    at get_all_files_to_build (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:192:9)
    at build_assets_for_apps (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:134:5)
    at execute (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:104:19)
    at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:89:1)
    at Module._compile (node:internal/modules/cjs/loader:1529:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
    at Module.load (node:internal/modules/cjs/loader:1275:32)
    at Module._load (node:internal/modules/cjs/loader:1096:12)
    at Module.require (node:internal/modules/cjs/loader:1298:19)
Terminated
error Command failed with exit code 143.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1363, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/utils.py", line 77, in build
    bundle(
  File "/home/frappe/frappe-bench/apps/frappe/frappe/build.py", line 255, in bundle
    frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 97, in popen
    raise subprocess.CalledProcessError(return_, command)
subprocess.CalledProcessError: Command 'yarn run production --apps verp_staffing --run-build-command' returned non-zero exit status 143.
ERROR: bench build --app verp_staffing
subprocess.CalledProcessError: Command 'bench build --app verp_staffing' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.11/site-packages/bench/cli.py", line 132, in cli
    bench_command()
  File "/usr/local/lib/python3.11/site-packages/bench/commands/make.py", line 181, in get_app
    get_app(
  File "/usr/local/lib/python3.11/site-packages/bench/app.py", line 786, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/usr/local/lib/python3.11/site-packages/bench/utils/render.py", line 126, in wrapper_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bench/app.py", line 253, in install
    install_app(
  File "/usr/local/lib/python3.11/site-packages/bench/app.py", line 967, in install_app
    build_assets(bench_path=bench_path, app=app, using_cached=using_cached)
  File "/usr/local/lib/python3.11/site-packages/bench/utils/bench.py", line 404, in build_assets
    exec_cmd(command, cwd=bench_path, env=env)
  File "/usr/local/lib/python3.11/site-packages/bench/utils/__init__.py", line 184, in exec_cmd
    raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app verp_staffing

I am getting the same error while building my custom app.

This error is not from India Compliance app but from verp_staffing app.

Maybe there is typo in path specified in hook