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

[BUG] Notifications dashboard doesn't install correctly in OSD #185

Closed
derek-ho opened this issue Apr 19, 2024 · 5 comments
Closed

[BUG] Notifications dashboard doesn't install correctly in OSD #185

derek-ho opened this issue Apr 19, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@derek-ho
Copy link
Contributor

derek-ho commented Apr 19, 2024

  • build notifications dashboard
  • install it into OSD
  • See the following error:
curl: (7) Failed to connect to localhost port 5601 after 0 ms: Connection refused
{"type":"log","@timestamp":"2024-04-19T18:52:41Z","tags":["fatal","root"],"pid":2551,"message":"Error: Cannot find module '../../public/utils/constants'\nRequire stack:\n- /home/runner/work/opensearch-dashboards-functional-test/opensearch-dashboards-functional-test/opensearch-dashboards-3.0.0/plugins/notificationsDashboards/server/routes/configRoutes.js\n- /home/runner/work/opensearch-dashboards-functional-test/opensearch-dashboards-functional-test/opensearch-dashboards-3.0.0/plugins/notificationsDashboards/server/routes/index.js\n- /home/runner/work/opensearch-dashboards-functional-test/opensearch-dashboards-functional-test/opensearch-dashboards-3.0.0/plugins/notificationsDashboards/server/plugin.js\n- /home/runner/work/opensearch-dashboards-functional-test/opensearch-dashboards-functional-test/opensearch-dashboards-3.0.0/plugins/notificationsDashboards/server/index.js\n- /home/runner/work/opensearch-dashboards-functional-test/opensearch-dashboards-functional-test/opensearch-dashboards-3.0.0/src/core/server/
 FATAL  Error: Cannot find module '../../public/utils/constants'
Require stack:
- /home/runner/work/opensearch-dashboards-functional-test/opensearch-dashboards-functional-test/opensearch-dashboards-3.0.0/plugins/notificationsDashboards/server/routes/configRoutes.js
- 

Related PR:
#165

Discovered via: opensearch-project/opensearch-dashboards-functional-test#1146

@ruanyl
Copy link
Member

ruanyl commented Apr 22, 2024

I'm getting the same error, this seems related a recent commit 1fc2abe

@ruanyl
Copy link
Member

ruanyl commented Apr 22, 2024

cc @SuZhou-Joe @Hailong-am

@SuZhou-Joe
Copy link
Member

Let me see.

@SuZhou-Joe
Copy link
Member

@amsiglan Code from server directory should not rely on the code from public directory.

image

For the final build tar, the public directory of plugins will be bundled to target/{pluginId}.bundle.js, and server side's code won't be able to find the reference within public directory.

@Hailong-am
Copy link
Collaborator

this fixed by #189

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants