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

React frontend to SDT #235

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

React frontend to SDT #235

wants to merge 27 commits into from

Conversation

rachejazz
Copy link
Member

No description provided.

Apurv428 and others added 27 commits July 9, 2024 23:49
Signed-off-by: Apurv Sonawane <apurvsonawane28@gmail.com>
Signed-off-by: Apurv Sonawane <apurvsonawane28@gmail.com>
Signed-off-by: Apurv Sonawane <apurvsonawane28@gmail.com>
Signed-off-by: Apurv Sonawane <apurvsonawane28@gmail.com>
feat: added cors for backend flask
Signed-off-by: Apurv Sonawane <apurvsonawane28@gmail.com>
Signed-off-by: Apurv Sonawane <apurvsonawane28@gmail.com>
Signed-off-by: Apurv Sonawane <apurvsonawane28@gmail.com>
Signed-off-by: Apurv Sonawane <apurvsonawane28@gmail.com>
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Implemented filter distribution functionality
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Deveshi Dwivedi <120312681+deveshidwivedi@users.noreply.github.com>
Updated package count and searching
Signed-off-by: Apurv428 <84929607+Apurv428@users.noreply.github.com>
Signed-off-by: Deveshi Dwivedi <deveshigurgaon@gmail.com>
Signed-off-by: Apurv Sonawane <apurvsonawane28@gmail.com>
@pleia2
Copy link
Contributor

pleia2 commented Sep 4, 2024

Not sure what I'm missing here, but I'm getting the following when I try to start the application (I install npm from the Ubuntu 24.04 package):

elizabeth@sdt:/opt/software-discovery-tool/react-frontend$ sudo npm run start

> sdt-veryfinal@0.1.0 start
> react-scripts start

/opt/software-discovery-tool/react-frontend/node_modules/@babel/types/lib/definitions/index.js:86
_toFastProperties(_utils.VISITOR_KEYS);
^

TypeError: _toFastProperties is not a function
    at Object.<anonymous> (/opt/software-discovery-tool/react-frontend/node_modules/@babel/types/lib/definitions/index.js:86:1)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/opt/software-discovery-tool/react-frontend/node_modules/@babel/types/lib/validators/validate.js:9:14)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)

Node.js v18.19.1

@vivkong
Copy link

vivkong commented Sep 5, 2024

I was using Node v22.8.0 and npm v10.8.2. Was able to start the frontend but ran into the following:

  1. No distros shown:
image

and therefore got no search results:
image

  1. When I clicked Home I got the following error:
image

@pleia2
Copy link
Contributor

pleia2 commented Sep 5, 2024

In your .env file, what URL did you specify for REACT_APP_API_URL ?

@vivkong
Copy link

vivkong commented Sep 5, 2024

$ cat .env
REACT_APP_API_URL='http://localhost:80/sdt'

@deveshidwivedi
Copy link
Collaborator

Hi @vivkong, I faced a similar issue initially. If the console shows errors related to cors, could you try installing the Allow CORS extension and check if the distros show?

@vivkong
Copy link

vivkong commented Sep 5, 2024

I've installed the extension but the distros didn't show up:

image

@deveshidwivedi
Copy link
Collaborator

I've installed the extension but the distros didn't show up:

image

Are there any errors in the console currently?

@vivkong
Copy link

vivkong commented Sep 5, 2024

Are there any errors in the console currently?

I didn't see any errors. This is the output I got:

Compiled successfully!

You can now view sdt-veryfinal in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://10.11.109.65:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

webpack compiled successfully

@Apurv428
Copy link
Collaborator

Hi @vivkong , is the flask server running?

@vivkong
Copy link

vivkong commented Sep 23, 2024

Hi @vivkong , is the flask server running?

I believe so. Since this is working:
image

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

Successfully merging this pull request may close these issues.

5 participants