Skip to content
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

/insights page appears empty #406

Open
Doppelfelix opened this issue Dec 22, 2024 · 6 comments
Open

/insights page appears empty #406

Doppelfelix opened this issue Dec 22, 2024 · 6 comments

Comments

@Doppelfelix
Copy link

Description

nexterp.my-domain.com/insights page is completely blank

Dev Tools

image

Installed versions

ERPNext: v15.46.1

Frappe Framework: v15.50.1

Frappe Insights: v3.0.0 (develop)

Background

  • installed nexterpv15 on my server with the easy-install.sh script.
  • Using bench on the backend I installed insights.
  • I can see it in the Help -> About -> Installed Apps.
  • I can also find it using the search bar, i.e. "Open Insights"
  • I tried to ran 'yarn build' again in the frondend folder in apps/insights/frontend (taken from here insights is not appearing in ERPNext 15 awesome search bar #282

I couldn't find any documentation on how to setup insights along side of erpnext. Am I missing something here?
Thanks for any help!

@vineyrawat
Copy link

Is it fixed or you're still facing this issue?

@Doppelfelix
Copy link
Author

didn't manage to make it work.

@vineyrawat
Copy link

Okay I'll try with the same version of frappe and erpnext until then could you please share with me the bench build --app insights output

@Doppelfelix
Copy link
Author

running from inside of the backend container I get this error:

frappe@c098f592d1fd:~/frappe-bench$ bench build --app insights
[Errno 18] Invalid cross-device link: 'tmp91c2c57ffd168dc2f2b1134af986c86b4847d734b2bc5a00a20ddc44' -> './assets/frappe'
Cannot link /home/frappe/frappe-bench/apps/frappe/frappe/public to ./assets/frappe
[Errno 2] No such file or directory: 'tmp6d02e102d475568b228071070271c8df00c17645c425a66d33d592f2' -> './assets/frappe/node_modules'
Cannot link /home/frappe/frappe-bench/apps/frappe/node_modules to ./assets/frappe/node_modules
[Errno 18] Invalid cross-device link: 'tmp82031a5f3f5c3e0e59f97495fe69443dec5a1d271a6e8872b852e5ba' -> './assets/erpnext'
Cannot link /home/frappe/frappe-bench/apps/erpnext/erpnext/public to ./assets/erpnext
[Errno 2] No such file or directory: 'tmp54c298acfb01138f35384675ee9060b12bdcc30464dcf010c5b397d3' -> './assets/erpnext/node_modules'
Cannot link /home/frappe/frappe-bench/apps/erpnext/node_modules to ./assets/erpnext/node_modules
[Errno 18] Invalid cross-device link: 'tmpbaa47a1b472882250246f7d242ac848f1fbc27e745de55101f01d714' -> './assets/insights'
Cannot link /home/frappe/frappe-bench/apps/insights/insights/public to ./assets/insights
[Errno 2] No such file or directory: 'tmpa981b55d3a0cb2a2132ea6694031cc072d0c5fedd1ff1cb7cedfb6a4' -> './assets/insights/node_modules'
Cannot link /home/frappe/frappe-bench/apps/insights/node_modules to ./assets/insights/node_modules
✔ Application Assets Linked


yarn run v1.22.22
$ node esbuild --production --apps insights --run-build-command
File                                                        Size

 DONE  Total Build Time: 235.611ms


Running build command for insights
$ cd frontend && yarn build
$ vite build -l warn --base=/assets/insights/frontend/ && yarn copy-html-entry && yarn copy-html-entry2
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme

Inter-DisplayRegular.woff2?v=3.19 referenced in /home/frappe/frappe-bench/apps/insights/frontend/src2/index.css didn't resolve at build time, it will remain unchanged to be resolved at runtime

Inter-DisplayRegular.woff2?v=3.19 referenced in /home/frappe/frappe-bench/apps/insights/frontend/src/index.css didn't resolve at build time, it will remain unchanged to be resolved at runtime
Killed
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run 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/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:448:5)
    at execute (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:125:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  status: 137,
  signal: null,
  output: [ null, null, null ],
  pid: 406,
  stdout: null,
  stderr: null
}
error Command failed with exit code 1.
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 1161, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1697, 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 1697, 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 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 788, 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 257, 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 insights --run-build-command' returned non-zero exit status 1.```

@vineyrawat
Copy link

There is same kind of error referenced in below
https://discuss.frappe.io/t/frappe-insights-build-error/133256

Just check it once, It might be the low memory issue.

Note

This is probably a memory issue. Check if you have enough memory available on your server/machine

@Doppelfelix
Copy link
Author

Rescaled to 8GB RAM. Unistalled and installed with bench.
Run the build again.

[Errno 18] Invalid cross-device link: 'tmp321d717acf01efbb65faafa5ca9a31804ae84c2403779276e3275595' -> './assets/frappe'
Cannot link /home/frappe/frappe-bench/apps/frappe/frappe/public to ./assets/frappe
[Errno 2] No such file or directory: 'tmp82f310f1617148612442b9bf18c0372c378fab7edcae5bd4ae60a83c' -> './assets/frappe/node_modules'
Cannot link /home/frappe/frappe-bench/apps/frappe/node_modules to ./assets/frappe/node_modules
[Errno 18] Invalid cross-device link: 'tmp7b07435a54a298b5e336a714cae425e551e1f52affb87a8ff5ee631e' -> './assets/erpnext'
Cannot link /home/frappe/frappe-bench/apps/erpnext/erpnext/public to ./assets/erpnext
[Errno 2] No such file or directory: 'tmp0ec62c9b34c0f5f20edba1fa1bc4c0d1dd0dc739c6689fac6b4eb0f1' -> './assets/erpnext/node_modules'
Cannot link /home/frappe/frappe-bench/apps/erpnext/node_modules to ./assets/erpnext/node_modules
[Errno 18] Invalid cross-device link: 'tmp7bb782aa7b64d190acd41bcd989fdc32bb71ab17f57576e8897dcbdd' -> './assets/insights'
Cannot link /home/frappe/frappe-bench/apps/insights/insights/public to ./assets/insights
[Errno 2] No such file or directory: 'tmpc4f5a68414686438f0557c89d744e284201eb8f4cccaa657b7a7a465' -> './assets/insights/node_modules'
Cannot link /home/frappe/frappe-bench/apps/insights/node_modules to ./assets/insights/node_modules
✔ Application Assets Linked


yarn run v1.22.22
$ node esbuild --production --apps insights --run-build-command
File                                                        Size

 DONE  Total Build Time: 150.607ms


Running build command for insights
$ cd frontend && yarn build
$ vite build -l warn --base=/assets/insights/frontend/ && yarn copy-html-entry && yarn copy-html-entry2
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme

Inter-DisplayRegular.woff2?v=3.19 referenced in /home/frappe/frappe-bench/apps/insights/frontend/src/index.css didn't resolve at build time, it will remain unchanged to be resolved at runtime

Inter-DisplayRegular.woff2?v=3.19 referenced in /home/frappe/frappe-bench/apps/insights/frontend/src2/index.css didn't resolve at build time, it will remain unchanged to be resolved at runtime

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
$ cp ../insights/public/frontend/index.html ../insights/www/insights.html
$ cp ../insights/public/frontend/index_v2.html ../insights/www/insights_v2.html
Done in 28.83s.
Compiling translations for insights

And for the installation trace


Installing insights...
Skipping fixture syncing from the file insights_data_source.json. Reason: Module import failed for Insights Data Source, the DocType you're trying to open might be deleted.
Error: No module named 'frappe.core.doctype.insights_data_source'
Skipping fixture syncing from the file insights_notebook.json. Reason: Module import failed for Insights Notebook, the DocType you're trying to open might be deleted.
Error: No module named 'frappe.core.doctype.insights_notebook'
Skipping fixture syncing from the file insights_data_source_v3.json. Reason: Module import failed for Insights Data Source v3, the DocType you're trying to open might be deleted.
Error: No module named 'frappe.core.doctype.insights_data_source_v3'
Updating Dashboard for insights

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants