I'm attempting to use sendgrid in my React application to send emails. I keep getting errors: 'can't resolve fs' and can't resolve 'path'. These issues are linked to the node.modules 'node_modules/#sendgrid/helpers/classes'.
I have attempted to remove them. But no luck, anyone else come across this issue?
You are running a backend code on the browser frontend.
Use Server Side rendering with NextJS or use simple NodeJS backend Code to achieve this.
Related
Hi guys I’m trying to bulid a website which django works as an rest-api and react works as a front side. I manage to do the whole thing just fine and about to deploy it using aws. But there is one thing I couldn’t really get. Inside my django project I have an app that uses only django template to render things to front. And other apps are working only as apis to get and post things via react. Is it possible to deploy this kind of structure without any special options? I searched internet for a while but I couldn’t really find an example that fits my situation. Thanks!
Yes, you should be able to deploy it without extra options: you can have one Django template view to host the React app entry point, and the rest would be Rest API views that are accessed by React.
I deployed my React web work as a test at Vercel but the API didn't work and my web now is Empty..
my project and api works perfectly in my localhost !
some one knows why ?
my empty web :-
https://web-3-0-prokect-1.vercel.app/
api code in the useEffect hook:-
https://github.com/Adelndf/web.3.0-prokect-1/blob/master/src/App.js
by the way im new in coding so some of my coding words or terms might be little bit weird :)
hopefully someone understand my issue here
Your API request is not successful because of CORS error. This usually won't be an issue when you try in localhost. To learn more about CORS, click here.
I fixed it with the easy way cuz at the end its just a testing project..
the solution if any one needed it is :-
i added ( https://cors-anywhere.herokuapp.com/ ) before my api ulr and it works..
u can see it in github link at the top
Am new to reactjs trying to integrate postgres with reactjs. Is there any way to integrate postgraphile with reactjs.
If so, please help me with a code or tutorial link.
Here are a collection of app examples using PostGraphile, some of these involve React:
https://github.com/graphile/postgraphile/wiki/App-Examples
Also check out https://github.com/graphile/examples and https://github.com/graphile/bootstrap-react-apollo
While there's already an accepted answer here, it missed stating something obvious: the way you "integrate reactjs and postgraphile" is by using a GraphQL client library (eg. Apollo, Relay, Lokka, etc.) in your React application to access the API that postgraphile creates.
Is there any way to use SOAP service and pass requests to it from React application? I tried both soap and easysoap for node.js but react immediatly throws an error when I try to use them.
Any help would be appreciated.
You are getting the error because you are trying to use easysoap from a React app directly.
Browser in which your app is being run doesn't have access to readFileSync function, and this is the reason you are getting the error.
You will need to implement alternatives such as:
https://github.com/doedje/jquery.soap
https://www.npmjs.com/package/tinysoap
I want to use frontend routing with angular js (with $routeProvider), and login using passport js. I found out that there are many problems while redirecting, communication between frontend and backend, showing messages and etc. Does there exist any complete tutorial on this?
I learned it here but it's long. Maybe it helps. They use what you need.