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

Fixing webpack proxy configuration #347

Closed
wants to merge 1 commit into from

Conversation

ederign
Copy link
Member

@ederign ederign commented Sep 4, 2024

Description

At least on my machine, when I run the FE, I got an error:

(base) ➜  frontend git:(webpack-fix) node --version                                                                                                                             (kind-nbv2-1/default)
v18.20.3
(base) ➜  frontend git:(webpack-fix) npm --version                                                                                                                              (kind-nbv2-1/default)
10.7.0


(base) ➜  frontend git:(main) npm run start:dev                                                                                                                                 (kind-nbv2-1/default)

> [email protected] start:dev
> webpack serve --hot --color --config ./config/webpack.dev.js

[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
 - options.proxy should be an array:
   [object { … } | function, ...]
   -> Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain.
   -> Read more at https://webpack.js.org/configuration/dev-server/#devserverproxy

After my changes:

I'm not an webpack expert, please review this carefully!

Screenshot 2024-09-04 at 5 21 30 PM Screenshot 2024-09-04 at 5 22 55 PM

How Has This Been Tested?

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • [X ] The commits have meaningful messages; the author will squash them after approval or in case of manual merges will ask to merge with squash.
  • [ X] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • [X ] The developer has manually tested the changes and verified that the changes work.
  • [ X] Code changes follow the kubeflow contribution guidelines.

If you have UI changes

  • The developer has added tests or explained why testing cannot be added.
  • [X ] Included any necessary screenshots or gifs if it was a UI change.
  • Verify that UI/UX changes conform the UX guidelines for Kubeflow.

Signed-off-by: Eder Ignatowicz <[email protected]>
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from ederign. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

host: PROXY_HOST,
protocol: PROXY_PROTOCOL,
port: PROXY_PORT,
secure: false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ederign
Copy link
Member Author

ederign commented Sep 4, 2024

@alexcreasy, how did you test this when you introduced it? because /api is 404 right now on the BFF.

@ederign
Copy link
Member Author

ederign commented Sep 5, 2024

Fixed by #345

@ederign ederign closed this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant