Frappe Cloud custom app build fail

I’m trying to update my custom app on Frappe Cloud. It fails to build after I started using frappe-react-sdk for the frontend. I get the following error on github workflow and frappe cloud. What could I be doing wrong?

Running build command for aimlm
$ cd dashboard && yarn build
$ vite build --base=/assets/aimlm/dashboard/ && yarn copy-html-entry
/bin/sh: 1: vite: not found
error Command failed with exit code 127.
info Visit for documentation about this command.
error Command failed with exit code 127.
info Visit for documentation about this command.
Error: Command failed: yarn build
    at checkExecSyncError (node:child_process:890:11)
    at execSync (node:child_process:962:15)
    at run_build_command_for_apps (/home/runner/frappe-bench/apps/frappe/esbuild/esbuild.js:451:5)
    at execute (/home/runner/frappe-bench/apps/frappe/esbuild/esbuild.js:128:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  status: 127,
  signal: null,
  output: [ null, null, null ],
  pid: 3558,
  stdout: null,
  stderr: null
error Command failed with exit code 1.
info Visit for documentation about this command.
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/", line 86, in _run_code
    exec(code, run_globals)
  File "/home/runner/frappe-bench/apps/frappe/frappe/utils/", line 114, in <module>
  File "/home/runner/frappe-bench/apps/frappe/frappe/utils/", line 20, in main
  File "/home/runner/frappe-bench/env/lib/python3.10/site-packages/click/", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/runner/frappe-bench/env/lib/python3.10/site-packages/click/", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/runner/frappe-bench/env/lib/python3.10/site-packages/click/", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/runner/frappe-bench/env/lib/python3.10/site-packages/click/", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/runner/frappe-bench/env/lib/python3.10/site-packages/click/", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/runner/frappe-bench/env/lib/python3.10/site-packages/click/", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/runner/frappe-bench/apps/frappe/frappe/commands/", line 71, in build
  File "/home/runner/frappe-bench/apps/frappe/frappe/", line 256, in bundle
    frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
  File "/home/runner/frappe-bench/apps/frappe/frappe/commands/", line 97, in popen
    raise subprocess.CalledProcessError(return_, command)
subprocess.CalledProcessError: Command 'yarn run production --apps aimlm --run-build-command' returned non-zero exit status 1.
ERROR: bench build --app aimlm
subprocess.CalledProcessError: Command 'bench build --app aimlm' returned non-zero exit status 1.

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

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.13/x64/bin/bench", line 8, in <module>
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/bench/", line 132, in cli
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/bench/commands/", line 167, in get_app
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/bench/", line 444, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/bench/utils/", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/bench/", line 242, in install
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/bench/", line 586, in install_app
    build_assets(bench_path=bench_path, app=app)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/bench/utils/", line 351, in build_assets
    exec_cmd(command, cwd=bench_path, env={"BENCH_DEVELOPER": "1"})
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/bench/utils/", line 158, in exec_cmd
    raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app aimlm

Error: Process completed with exit code 1.

Hi @Chipo_Hameja,

raise a support ticket on Frappe Cloud.

Thank You!

Hello @NCP ,

thanks for the response. I already raised a support ticket. I am still waiting for a response. I was hoping I’d get quick help in the community. I’ll continue waiting. Thanks again

@Chipo_Hameja Hey bro…

Based on the error you posted, during the build process the following command was executed and it raised an error…

yarn run production --apps aimlm --run-build-command

I hope that I was helpful…

Best regards…

1 Like

Hello @kid1194

Am I supposed to run that command?


@Chipo_Hameja I’m sorry bro, I forgot something…

The error was raised because of the command vite build since vite: not found

So check out the vite documentation and make sure it’s installed before running the build command…

Best regards…

I found a fix yarn build runs before dependencies are installed

Changing it to cd dashboard && yarn && yarn build installs the dependencies first and successfully builds the application