0

I`m trying to understand how to run this project, published on GitHub here

No idea how. I ran npm i, and then npm start, but I got these messages:

npm start

> fed-entry-level-exam-root@1.0.0 start C:\entry-level-exam_19\entry-level-exam
> lerna run start --parallel

lerna notice cli v3.22.1
lerna info Executing command in 2 packages: "npm run start"
@fed-exam/client: > @fed-exam/client@1.0.0 start C:\entry-level-exam_19\entry-level-exam\client
@fed-exam/client: > set CI=true && react-scripts start
@fed-exam/server: > @fed-exam/server@1.0.0 start C:\entry-level-exam_19\entry-level-exam\server
@fed-exam/server: > ts-node-dev index.ts
@fed-exam/server: [INFO] 21:51:34 ts-node-dev ver. 1.1.0 (using ts-node ver. 9.1.1, typescript    ver. 3.9.9)
@fed-exam/server: starting server { serverAPIPort: 3232, APIPath: '/api/tickets' }
@fed-exam/server: server running 3232
@fed-exam/client: i 「wds」: Project is running at http://192.168.0.108/
@fed-exam/client: i 「wds」: webpack output is served from 
@fed-exam/client: i 「wds」: Content not from webpack is served from C:\entry-level-exam_19\entry-level-exam\client\public
@fed-exam/client: i 「wds」: 404s will fallback to /
@fed-exam/client: Starting the development server...

I tried to open http://localhost:3232/ but I getting this error:

Cannot GET /

Also tried : http://localhost:3000

Which is known for React localhost.

So far I don't know how to make it work. Any help will be appreciated.

חיים חדד
  • 512
  • 5
  • 17

2 Answers2

0

run the client and server separately, after running npm install and npm start open a new terminal and run npm start inside client/ directory

Arfan ali
  • 429
  • 2
  • 5
  • Are you sure? I been told to run everything through the root folder – חיים חדד Mar 01 '21 at 20:40
  • Yes, bro.. i have checked the project, configurations are not done to run the project from the root folder, that's why the best solution is to run the client and server separately – Arfan ali Mar 01 '21 at 21:04
0

If you carefully read messages on the console you will notice where the api is running.

The lines

@fed-exam/server: starting server { serverAPIPort: 3232, APIPath: '/api/tickets' }

@fed-exam/server: server running 3232

Shows that server project is running at port 3232, but that api path starts at /api/tickets. So, for access the root of the api, access http://localhost:3232/api/tickets.

You could check how this works by checking the express app code on server folder.

And there is a problem with the client code that is related with react-scripts when trying to run projects using lerna package. The line

Content not from webpack is served from C:\entry-level-exam_19\entry-level-exam\client\public

Was previously reported as error here: Content not from webpack is served from /foo

Try to solve the issue using our colleagues suggestions.

Erme Schultz
  • 319
  • 5
  • 17