-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bench.exceptions.CommandFailedError: bench build --app print_designer #6
Comments
Can you please share the frappe framework version you are using? also share the steps that you followed. |
i also ran into this problem when running bench get-app my frappe version is 14.39.0 |
All I did is get-app print_designer. I could resolve this issue by installing the following dependancies
and
after doing this, I tried again and it worked. Thank you. |
Please note that print designer is only compatible with develop version of frappe framework. v14 is not supported as this app requires vue3. |
Hi, I had the same issue myself, on Mac OSX running I also managed to get around this by installing the apps @delnxintl listed above, however I wonder if there is a more permanent and cleaner solution? Installing those apps as root in my docker container every time it is rebuilt or updated isn't ideal, and leads to quite a lot of container image bloat in the writeable layer. There seems to be a 404 when it tries downloading pre-built binaries of canvas:
I'm not sure where it gets that URL from; in canvas@^2.11.0:
version "2.11.2"
resolved "https://registry.yarnpkg.com/canvas/-/canvas-2.11.2.tgz#553d87b1e0228c7ac0fc72887c3adbac4abbd860"
integrity sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==
dependencies:
"@mapbox/node-pre-gyp" "^1.0.0"
nan "^2.17.0"
simple-get "^3.0.3" The full output from my running
|
@alexleach Please check FAQ no 2 |
Hi @maharshivpatel , thanks for the response. I actually have run that on my host machine, but as I have frappe / erpnext running inside of docker (using the frappe/erpnext:v15.xxx image), the host libraries aren't available inside the container. So, I have actually installed those libraries with Homebrew, as suggested, but to no effect. (So, I should remove them really...) |
yarn run v1.22.21
You can mark the path "canvas" as external to exclude it from the bundle, which will remove this ✘ [ERROR] [plugin frappe-vue-style] Cannot read properties of undefined (reading 'outputs')
This error came from the "onEnd" callback registered here:
ERROR There were some problems during build Error: Build failed with 2 errors: The above exception was the direct cause of the following exception: Traceback (most recent call last): |
✘ [ERROR] Could not resolve "canvas"
You can mark the path "canvas" as external to exclude it from the bundle, which will remove this
error. You can also surround this "require" call with a try/catch block to handle this failure at
run-time instead of bundle-time.
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
✘ [ERROR] [plugin frappe-vue-style] Cannot read properties of undefined (reading 'outputs')
This error came from the "onEnd" callback registered here:
ERROR There were some problems during build
Error: Build failed with 2 errors:
../print_designer/print_designer/public/js/pdf.worker.min.js:22:25511: ERROR: Could not resolve "canvas"
/home/ubuntu/devprod/apps/frappe/esbuild/frappe-vue-style.js:10:41: ERROR: [plugin: frappe-vue-style] Cannot read properties of undefined (reading 'outputs')
at failureErrorWithLog (/home/ubuntu/devprod/apps/frappe/node_modules/esbuild/lib/main.js:1600:15)
at /home/ubuntu/devprod/apps/frappe/node_modules/esbuild/lib/main.js:1246:28
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
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 "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/ubuntu/devprod/apps/frappe/frappe/utils/bench_helper.py", line 104, in
main()
File "/home/ubuntu/devprod/apps/frappe/frappe/utils/bench_helper.py", line 19, in main
click.Group(commands=commands)(prog_name="bench")
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/devprod/env/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return _callback(*args, **kwargs)
File "/home/ubuntu/devprod/apps/frappe/frappe/commands/utils.py", line 65, in build
bundle(mode, apps=apps, hard_link=hard_link, verbose=verbose, skip_frappe=skip_frappe)
File "/home/ubuntu/devprod/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/ubuntu/devprod/apps/frappe/frappe/commands/init.py", line 98, in popen
raise subprocess.CalledProcessError(return, command)
subprocess.CalledProcessError: Command 'yarn run production --apps print_designer --run-build-command' returned non-zero exit status 143.
ERROR: bench build --app print_designer
subprocess.CalledProcessError: Command 'bench build --app print_designer' 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
sys.exit(cli())
File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 132, in cli
bench_command()
File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 159, in get_app
get_app(
File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 412, in get_app
install_resolved_deps(
File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 514, in install_resolved_deps
app.install_resolved_apps(skip_assets=skip_assets, verbose=verbose)
File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 255, in install_resolved_apps
self.install(*args, **kwargs, resolved=True)
File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 242, in install
install_app(
File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 586, in install_app
build_assets(bench_path=bench_path, app=app)
File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 351, in build_assets
exec_cmd(command, cwd=bench_path, env={"BENCH_DEVELOPER": "1"})
File "/usr/local/lib/python3.10/dist-packages/bench/utils/init.py", line 158, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app print_designer
The text was updated successfully, but these errors were encountered: