frappe / insights

Open Source Business Intelligence Tool
https://frappe.io/insights
GNU Affero General Public License v3.0
450 stars 219 forks source link

Error: while installing insights #114

Closed Govind-Jangid closed 1 year ago

Govind-Jangid commented 1 year ago

bench get-app insights Getting insights $ git clone https://github.com/frappe/insights.git --depth 1 --origin upstream Cloning into 'insights'... remote: Enumerating objects: 494, done. remote: Counting objects: 100% (494/494), done. remote: Compressing objects: 100% (460/460), done. remote: Total 494 (delta 67), reused 250 (delta 27), pack-reused 0 Receiving objects: 100% (494/494), 14.12 MiB | 17.78 MiB/s, done. Resolving deltas: 100% (67/67), done. Ignoring dependencies of insights. To install dependencies use --resolve-deps Installing insights $ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/insights error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [21 lines of output] Traceback (most recent call last): File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable return hook(config_settings) File "/tmp/pip-build-env-8fnxihyp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 447, in get_requires_for_build_editable return self.get_requires_for_build_wheel(config_settings) File "/tmp/pip-build-env-8fnxihyp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "/tmp/pip-build-env-8fnxihyp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-8fnxihyp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 484, in run_setup super(_BuildMetaLegacyBackend, File "/tmp/pip-build-env-8fnxihyp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup exec(code, locals()) File "", line 7, in File "/home/frappe/frappe-bench/apps/insights/insights/init.py", line 4, in import frappe ModuleNotFoundError: No module named 'frappe' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Traceback (most recent call last): File "/usr/local/bin/bench", line 8, in sys.exit(cli()) File "/home/frappe/.local/lib/python3.10/site-packages/bench/cli.py", line 127, in cli bench_command() File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke return __callback(args, *kwargs) File "/home/frappe/.local/lib/python3.10/site-packages/bench/commands/make.py", line 159, in get_app get_app( File "/home/frappe/.local/lib/python3.10/site-packages/bench/app.py", line 432, in get_app app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench) File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/render.py", line 126, in wrapper_fn return fn(args, **kwargs) File "/home/frappe/.local/lib/python3.10/site-packages/bench/app.py", line 230, in install install_app( File "/home/frappe/.local/lib/python3.10/site-packages/bench/app.py", line 561, in install_app bench.run( File "/home/frappe/.local/lib/python3.10/site-packages/bench/bench.py", line 47, in run return exec_cmd(cmd, cwd=cwd or self.cwd) File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/init.py", line 155, in exec_cmd raise CommandFailedError bench.exceptions.CommandFailedError

nextchamp-saqib commented 1 year ago

I have pushed a fix (a367130075b3a4faf3630f21279d94e5b0e494fa), can you install and check now

Govind-Jangid commented 1 year ago

Running build command for insights $ cd frontend && yarn build $ vite build --base=/assets/insights/frontend/ && yarn copy-html-entry ▲ [WARNING] "import.meta" is not available with the "cjs" output format and will be empty [empty-import-meta]

vite.config.js:24:13:
  24 │     sourcemap: import.meta?.env?.CI ? false : 'inline',
     ╵                ~~~~~~~~~~~

You need to set the output format to "esm" for "import.meta" to work correctly.

vite v4.2.1 building for production... ✓ 1984 modules transformed. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/dashboard/CreateQueryDialog.vue" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/dashboard/usePublicDashboard.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/query/usePublicChart.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/components/SetupWizard/AddDatabase.vue" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/components/ImportDialog.vue" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/pages/DataSourceTable.vue" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/components/ShareDialog.vue" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/components/AlertDialog.vue" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/components/PublicShareDialog.vue" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/query/useQueries.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/datasource/useDataSources.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/pages/AddTeamDialog.vue" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/utils/useUsers.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/utils/useTeams.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. Export "createResource" of module "node_modules/frappe-ui/src/resources/resources.js" was reexported through module "node_modules/frappe-ui/src/index.js" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "src/dashboard/useDashboards.js" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk. [vite:esbuild-transpile] Transform failed with 1 error: /home/frappe/frappe-bench/apps/insights/frontend/node_modules/esbuild/lib/main.js:249:10: ERROR: "loader" must be a string

"loader" must be a string 247| label: "Title", 248| placeholder: "Enter a suitable title...", 249| modelValue: newDashboardTitle.value, | ^ 250| "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((newDashboardTitle).value = $event)) 251| }, null, 8, ["modelValue"])

✓ built in 28.57s error during build: Error: Transform failed with 1 error: /home/frappe/frappe-bench/apps/insights/frontend/node_modules/esbuild/lib/main.js:249:10: ERROR: "loader" must be a string at failureErrorWithLog (/home/frappe/frappe-bench/apps/insights/frontend/node_modules/esbuild/lib/main.js:1636:15) at /home/frappe/frappe-bench/apps/insights/frontend/node_modules/esbuild/lib/main.js:871:20 at responseCallbacks. (/home/frappe/frappe-bench/apps/insights/frontend/node_modules/esbuild/lib/main.js:697:9) at handleIncomingPacket (/home/frappe/frappe-bench/apps/insights/frontend/node_modules/esbuild/lib/main.js:752:9) at Socket.readFromStdout (/home/frappe/frappe-bench/apps/insights/frontend/node_modules/esbuild/lib/main.js:673:7) at Socket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12) at readableAddChunk (internal/streams/readable.js:267:9) at Socket.Readable.push (internal/streams/readable.js:206:10) at Pipe.onStreamRead (internal/stream_base_commons.js:188:23) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Error: Command failed: yarn build at checkExecSyncError (child_process.js:790:11) at execSync (child_process.js:863:15) at run_build_command_for_apps (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:433:5) at /home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:88:35 at processTicksAndRejections (internal/process/task_queues.js:95:5) { status: 1, signal: null, output: [ null, null, null ], pid: 137792, stdout: null, stderr: null }

Govind-Jangid commented 1 year ago

@nextchamp-saqib Now getting this error

nextchamp-saqib commented 1 year ago

Hey, thanks for checking! Found another bug, which has been fixed now, please check.