frappe / print_designer

Visual print designer for Frappe / ERPNext
GNU Affero General Public License v3.0
233 stars 123 forks source link

Error install #36

Closed eshaproject closed 1 year ago

eshaproject commented 1 year ago

Error installing

bench get-app https://github.com/frappe/print_designer
A directory for the application 'print_designer' already exists. Do you want to continue and overwrite it? [y/N]: y
INFO: App moved from apps/print_designer to archived/apps/print_designer-2023-08-05_1
Getting print_designer
$ git clone https://github.com/frappe/print_designer  --depth 1 --origin upstream
Cloning into 'print_designer'...
remote: Enumerating objects: 99, done.
remote: Counting objects: 100% (99/99), done.
remote: Compressing objects: 100% (92/92), done.
remote: Total 99 (delta 3), reused 54 (delta 1), pack-reused 0
Receiving objects: 100% (99/99), 513.62 KiB | 4.39 MiB/s, done.
Resolving deltas: 100% (3/3), done.
Ignoring dependencies of https://github.com/frappe/print_designer. To install dependencies use --resolve-deps
Installing print_designer
$ /home/erp/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/erp/frappe-bench/apps/print_designer
$ yarn install
yarn install v1.22.19
warning ../../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @interactjs/actions@1.10.17" has unmet peer dependency "@interactjs/core@1.10.17".
warning " > @interactjs/actions@1.10.17" has unmet peer dependency "@interactjs/utils@1.10.17".
warning " > @interactjs/auto-start@1.10.17" has unmet peer dependency "@interactjs/core@1.10.17".
warning " > @interactjs/auto-start@1.10.17" has unmet peer dependency "@interactjs/utils@1.10.17".
warning " > @interactjs/modifiers@1.10.17" has unmet peer dependency "@interactjs/core@1.10.17".
warning " > @interactjs/modifiers@1.10.17" has unmet peer dependency "@interactjs/utils@1.10.17".
warning "@interactjs/modifiers > @interactjs/snappers@1.10.17" has unmet peer dependency "@interactjs/utils@1.10.17".
[4/4] Building fresh packages...
Done in 12.09s.
$ bench build --app print_designer
Linking /home/erp/frappe-bench/apps/frappe/frappe/public to ./assets/frappe                                             Linking /home/erp/frappe-bench/apps/frappe/node_modules to ./assets/frappe/node_modules                                 Linking /home/erp/frappe-bench/apps/print_designer/print_designer/public to ./assets/print_designer                     Linking /home/erp/frappe-bench/apps/print_designer/node_modules to ./assets/print_designer/node_modules                 Linking /home/erp/frappe-bench/apps/payments/payments/public to ./assets/payments                                       Linking /home/erp/frappe-bench/apps/hrms/hrms/public to ./assets/hrms                                                   Linking /home/erp/frappe-bench/apps/hrms/node_modules to ./assets/hrms/node_modules                                     Linking /home/erp/frappe-bench/apps/erpnext/erpnext/public to ./assets/erpnext                                          Linking /home/erp/frappe-bench/apps/erpnext/node_modules to ./assets/erpnext/node_modules                               ✔ Application Assets Linked

yarn run v1.22.19
warning ../../package.json: No license field
$ node esbuild --production --apps print_designer --run-build-command
✘ [ERROR] Could not resolve "pinia"

    ../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:2:28:
      2 │ import { createPinia } from "pinia";
        ╵                             ~~~~~~~

  You can mark the path "pinia" as external to exclude it
  from the bundle, which will remove this error.

clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
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 vue] Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

1  |
2  |  <link rel="preconnect" href="https://fonts.gstatic.com" />
   |
3  |  <link
   |  ^^^^^
4  |    v-for="currentFont in MainStore.currentFonts"
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5  |    :key="currentFont"
   |  ^^^^^^^^^^^^^^^^^^^
6  |    :href="`https://fonts.googleapis.com/css2?family=${currentFont}:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap`"
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7  |    rel="stylesheet"
   |  ^^^^^^^^^^^^^^^^^
8  |  />
   |  ^^
9  |  <AppHeader :print_format_name="print_format_name" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |  <div class="main-layout" id="main-layout">
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |    <AppToolbar :class="toolbarClasses" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |    <AppCanvas class="app-sections print-format-container" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |    <AppPropertiesPanel class="app-sections properties-panel" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |  </div>
   |  ^^^^^^

    ../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:3:21:
      3 │ import Designer from "./App.vue";
        ╵                      ~~~~~~~~~~~

 ERROR  There were some problems during build

Error: Build failed with 2 errors:
../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:2:28: ERROR: Could not resolve "pinia"
../print_designer/print_designer/public/js/print_designer/print_designer.bundle.js:3:21: ERROR: [plugin: vue] Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

1  |
2  |  <link rel="preconnect" href="https://fonts.gstatic.com" />
   |
3  |  <link
   |  ^^^^^
4  |    v-for="currentFont in MainStore.currentFonts"
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5  |    :key="currentFont"
   |  ^^^^^^^^^^^^^^^^^^^
6  |    :href="`https://fonts.googleapis.com/css2?family=${currentFont}:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap`"
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7  |    rel="stylesheet"
   |  ^^^^^^^^^^^^^^^^^
8  |  />
   |  ^^
9  |  <AppHeader :print_format_name="print_format_name" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |  <div class="main-layout" id="main-layout">
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |    <AppToolbar :class="toolbarClasses" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |    <AppCanvas class="app-sections print-format-container" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |    <AppPropertiesPanel class="app-sections properties-panel" />
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |  </div>
   |  ^^^^^^
    at failureErrorWithLog (/home/erp/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1600:15)
    at /home/erp/frappe-bench/apps/frappe/node_modules/esbuild/lib/main.js:1246:28
    at processTicksAndRejections (node:internal/process/task_queues:96: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/erp/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 109, in <module>
    main()
  File "/home/erp/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erp/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/erp/frappe-bench/apps/frappe/frappe/commands/utils.py", line 86, in build
    bundle(mode, apps=apps, hard_link=hard_link, verbose=verbose, skip_frappe=skip_frappe)
  File "/home/erp/frappe-bench/apps/frappe/frappe/build.py", line 256, in bundle
    frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
  File "/home/erp/frappe-bench/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 <module>
    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 444, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  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
maharshivpatel commented 1 year ago

Please note that print designer is only compatible with develop version of frappe framework. v14 is not supported as this app requires vue3.

Create a site with develop / nightly version of frappe framework and try it out.

maharshivpatel commented 1 year ago

@eshaproject if you install it on develop branch and face any issues please reopen the issue. Thank you for trying print designer. I have also added warning/message when installing on older versions so this confusion won't happen again.