Can't add books from my localhost

after successfully integrating everything, i am wondering why my localhost is different from main website and i am also not able to add books and hence cannot see the form page.

My site:

Main site:

Is anyone getting the same error?
@endurance21 @prabalsingh24

Did you make changes in the config file? You have to addclientID and clientSecret tokens in config file

Here

yes @prabalsingh24 , i added them!
And by the way, i have done all the installation and configuration using ubuntu.

How’re you running your code? npm start? or npm start -- --config ./config/config.local.json

@prabalsingh24 i am doing npm start

You need to mention config file also. Here

1 Like

Hey @Prabhleen
I also faced the same issue at the start.
One thing you should know about our bookbrainz project…
It is SERVER SIDE RENDERED(SSR) react application meaning whenever you click on a button eg. Add button it triggers a route and then server sends a markup and other required stuffs to client side.
So in my case my server was not running well, and that’s why whenever I clicked ADD button I get nothing…

So please check in console, if something is wrong or what!!!

In short, check the console where server is running…

1 Like

@prabalsingh24 i did npm start -- --config ./config/config.json because i made changes to config.json like below but the problem is not resolved. @mr_monkey clearly mentioned here to use npm start:

@endurance21 i am getting this elasticsearch error:

Warning: Failed prop type: Invalid prop error.detailedMessage of type array supplied to ErrorPage, expected string.
in ErrorPage
HEAD /bookbrainz 404 126.682 ms - 8489
HEAD /bookbrainz 404 19.137 ms - 8489
PUT /bookbrainz 404 1539.929 ms - 8489
(node:29861) UnhandledPromiseRejectionWarning: Error: Not Found
at respond (/home/prabh_leen/bookbrainz-site/node_modules/elasticsearch/src/lib/transport.js:308:15)
at checkRespForFailure (/home/prabh_leen/bookbrainz-site/node_modules/elasticsearch/src/lib/transport.js:267:7)
at HttpConnector. (/home/prabh_leen/bookbrainz-site/node_modules/elasticsearch/src/lib/connectors/http.js:165:7)
at IncomingMessage.wrapper (/home/prabh_leen/bookbrainz-site/node_modules/lodash/lodash.js:4929:19)
at IncomingMessage.emit (events.js:323:22)
at endReadableNT (_stream_readable.js:1204:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:29861) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:29861) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@Prabhleen
Luckily I got the same error a while ago.:sweat_smile:
So now let’s discuss how to fix that.

are you getting the same error now also?
i mean where are you running your localhost then, to avoid the error?

I actually shifted to docker back then :sweat_smile::sweat_smile:

1 Like

@Prabhleen
Please confirm that, elastisearch is running
By applying this in terminal.
“Sudo systemctl status elastisearch”
and report the message it gives.

it gives: System has not been booted with systemd as init system (PID 1). Can't operate.

when i do:sudo service status elasticsearch, i get: status: unrecognized service

Then try this one
“Sudo service elastisearch status” :sweat_smile:

I/P:sudo service elasticsearch status
O/P: * elasticsearch is not running

I knew that :sweat_smile::sweat_smile:
So now
Do the following

“Sudo service elasticsearch start”
again check the status after that.

ok, so i started elasticsearch and confirmed the same from status, but then again when i run npm start, the problm is still the same, and error message too.

@Prabhleen
It hurts :joy::sweat_smile:
Let me figure out the things
@prabalsingh24
Is there something you can think of it?.

1 Like

truly! :sweat_smile: