philnash / twilio-video-react-hooks

A video chat application built with Twilio Video and React Hooks
MIT License
110 stars 61 forks source link

Fetching '/video/call' 404 not found #29

Closed cortejojicoy closed 4 years ago

cortejojicoy commented 4 years ago

Sir why I still receive this error?, thanks for kind response

philnash commented 4 years ago

Hey, I'm not sure why you are getting that!

There's nothing in the code that should be making a call to /video/call.

The path for the token should be /video/token.

Have you changed anything in the code?

cortejojicoy commented 4 years ago

hello sir thank you for response my bad I didn't notice its /video/token I changed it already but it display Module not found: Error Can't resolve 'fs' whenever I execute npm run dev

philnash commented 4 years ago

Hey @kukuxumusu21, that is concerning. The fs module is part of the Node.js standard library.

Are you trying to use fs in front end code?

philnash commented 4 years ago

Hey @kukuxumusu21 are you still having trouble with this? Or shall I close the issue?

Thanks!

philnash commented 4 years ago

I'm going to close this for inactivity for now. Please re-open if you're still having trouble.

HawiCaesar commented 4 years ago

Hey @philnash , I am having this error. Not sure why...I don't see the fs error

I get a 404 error when clickin on submit which calls /video/token

Screenshot 2020-10-23 at 13 06 54
HawiCaesar commented 4 years ago

Silly me 😅 , I had to add the server url like so fetch("http://localhost:3001/video/token"

And I had to add CORS package

philnash commented 4 years ago

@HawiCaesar are you running the front-end and back-end of this project separately?

If you start the project with npm run dev then the React application, through webpack-dev-server, should proxy API requests from localhost:3000 to localhost:3001 (where the Express server is running). You shouldn't need CORS for this, or to specify a full URL.

HawiCaesar commented 4 years ago

@philnash I'm not running them separately. What I did was to make a new project and only have the backend code. Then I started following the tutorial.

Looking deeper into the package.json I missed the proxy section. I didn't look into that.

It works fine now as per the tutorial.

Thank you for pointing that out.

philnash commented 4 years ago

Great to hear it's working!