Closed pgreenwo closed 4 months ago
Hi @pgreenwo, what is your node version? Can you try updating to node version 16 or 18 and try again?
Thanks @janhvipatil, apologies for the omission. My node version is already 18.18.2.
@pgreenwo Can you try running bench setup requirements
and then bench build --app raven
and see if the error persists? If that doesn't work, can we schedule a call to go over this? We haven't used Raven on a Docker based setup so cannot reproduce it.
@nikkothari22 Thanks for your suggestion. I haven't tried it because I think I have just discovered the root cause: The name of the github repository. When I forked it, and renamed it raven (with the capital R), everything installed fine.
I'll leave it to you to choose what to do about that insight! Please let me know if you would like me to try your suggestion.
FYI: I have made a feature request in bench for a --target-dir parameter in app-get. This would have eased the resolution of the issue.
My attempt to install Raven is failing at the "Bench get-app" stage.
I'm trying to install the latest release of Raven, v1.6.4.
I am trying to install it into a development container (Docker) that already has Frappe framework and Bench - My version of Bench is 5.22.6. The cointainer is running on Apple silicon (linux/arm64).
The error appears to be in response to the command: node esbuild --production --apps raven --run-build-command ERROR There were some problems during build
The command, and full response is as follows (the error message can be found some way down...):
frappe@e05da36b72fc:/workspace/development/frappe-bench$ bench get-app Raven https://github.com/The-Commit-Company/Raven.git --branch v1.6.4 Getting Raven $ git clone https://github.com/The-Commit-Company/Raven.git --branch v1.6.4 --depth 1 --origin upstream Cloning into 'Raven'... remote: Enumerating objects: 669, done. remote: Counting objects: 100% (669/669), done. remote: Compressing objects: 100% (575/575), done. remote: Total 669 (delta 93), reused 409 (delta 53), pack-reused 0 Receiving objects: 100% (669/669), 5.57 MiB | 8.42 MiB/s, done. Resolving deltas: 100% (93/93), done. Note: switching to '943509478306a2e3a05026cde87d4f7009fc1f10'.
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:
git switch -c
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Updating files: 100% (530/530), done. Ignoring dependencies of https://github.com/The-Commit-Company/Raven.git. To install dependencies use --resolve-deps Installing raven $ /workspace/development/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /workspace/development/frappe-bench/apps/raven $ yarn install --check-files yarn install v1.22.22 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Saved lockfile. $ yarn install-web && yarn install-desk yarn run v1.22.22 $ cd frontend && yarn install [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... warning " > @tiptap/extension-code-block-lowlight@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-code-block-lowlight@2.4.0" has unmet peer dependency "@tiptap/extension-code-block@^2.0.0". warning " > @tiptap/extension-highlight@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-image@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-link@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-mention@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-placeholder@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-typography@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-underline@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/react@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning "@tiptap/react > @tiptap/extension-bubble-menu@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning "@tiptap/react > @tiptap/extension-floating-menu@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/suggestion@2.4.0" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > autoprefixer@10.4.19" has unmet peer dependency "postcss@^8.1.0". warning " > vite-plugin-pwa@0.20.0" has unmet peer dependency "workbox-build@^7.1.0". warning " > vite-plugin-pwa@0.20.0" has unmet peer dependency "workbox-window@^7.1.0". [4/4] Building fresh packages... Done in 47.81s. yarn run v1.22.22 $ cd raven && yarn install warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... warning " > @tiptap/extension-highlight@2.3.1" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-link@2.3.1" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-mention@2.3.1" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-placeholder@2.3.1" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/extension-underline@2.3.1" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/react@2.3.1" has unmet peer dependency "@tiptap/core@^2.0.0". warning "@tiptap/react > @tiptap/extension-bubble-menu@2.3.1" has unmet peer dependency "@tiptap/core@^2.0.0". warning "@tiptap/react > @tiptap/extension-floating-menu@2.3.1" has unmet peer dependency "@tiptap/core@^2.0.0". warning " > @tiptap/suggestion@2.3.1" has unmet peer dependency "@tiptap/core@^2.0.0". [4/4] Building fresh packages... Done in 2.39s. Done in 51.51s. $ bench build --app raven ✔ Application Assets Linked
yarn run v1.22.22 $ node esbuild --production --apps raven --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 (/workspace/development/frappe-bench/apps/frappe/esbuild/esbuild.js:242:9) at build_assets_for_apps (/workspace/development/frappe-bench/apps/frappe/esbuild/esbuild.js:184:5) at execute (/workspace/development/frappe-bench/apps/frappe/esbuild/esbuild.js:116:19) at Object. (/workspace/development/frappe-bench/apps/frappe/esbuild/esbuild.js:95: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 "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 128, in
main()
File "/workspace/development/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 34, in main
FrappeCommandGroup(commands=commands)(prog_name="bench")
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/workspace/development/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 "/workspace/development/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 "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/development/frappe-bench/apps/frappe/frappe/commands/utils.py", line 87, in build
bundle(
File "/workspace/development/frappe-bench/apps/frappe/frappe/build.py", line 257, in bundle
frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raiseerr=True)
File "/workspace/development/frappe-bench/apps/frappe/frappe/commands/init.py", line 97, in popen
raise subprocess.CalledProcessError(return, command)
subprocess.CalledProcessError: Command 'yarn run production --apps raven --run-build-command' returned non-zero exit status 143.
ERROR: bench build --app raven
subprocess.CalledProcessError: Command 'bench build --app raven' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/frappe/.local/bin/bench", line 8, in
sys.exit(cli())
^^^^^
File "/home/frappe/.bench/bench/cli.py", line 132, in cli
bench_command()
File "/home/frappe/.bench/bench/commands/make.py", line 181, in get_app
get_app(
File "/home/frappe/.bench/bench/app.py", line 777, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File "/home/frappe/.bench/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/frappe/.bench/bench/app.py", line 254, in install
install_app(
File "/home/frappe/.bench/bench/app.py", line 925, in install_app
build_assets(bench_path=bench_path, app=app, using_cached=using_cached)
File "/home/frappe/.bench/bench/utils/bench.py", line 380, in build_assets
exec_cmd(command, cwd=bench_path, env=env)
File "/home/frappe/.bench/bench/utils/init.py", line 178, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app raven