I'm intergrating feathers js both on backend and frontend and I got page not found error when I tried this implementation. I would appreciate your help. thanks for the awesome work!
code
https://github.com/react-boilerplate/react-boilerplate/issues/2355
This is the same problem discussed in this FAQ.
Just like in Express itself, the order of middleware matters. If you
registered a custom middleware outside of the generator, you have to
make sure that it runs before the notFound() error midlleware.
This means that
app.use(express.notFound());
Always has to be the last app.use call.
Related
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.
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
My adaljs code to fetch a token for a web api is suddenly failing. This has been working for months now. Since yesterday, I get the following error.
Invalid_state. state: 7ea40a81-5491-47a1-8ebc-89488acb673a|https://sykesenterprises.onmicrosoft.com/MyAPI
This happens when the acquireToken method is called.
I am using the example from https://blog.mastykarz.nl/building-office-365-web-applications-react/ to use react with adaljs.
Managed to sort this out. If anyone else has the same issue, the answer was to just call adal.handleWindowCallback() at the entry point to the application.
The issue occurs because the sample you are referring to needs to be updated as per the latest version of Adal 1.0.16. I was able to fork the repo and submit a pull request to the owner to fix the invalid_state issue. Please refer to the link below to see the code changes:
https://github.com/waldekmastykarz/office-mygroups-react/pull/3/files
I'm building a web app with MEANjs and I'm having some trouble with the Oauth callbacks for Facebook, Twitter, and Google+ (lnkedin works fine). Basically everything works, but the callback gives me 'Page Not Found' Error: /api/auth/facebook/[object%20Object] is not a valid path.
If i navigate to another page, I find that I am logged in. The routes seem to be correct, as generated by MEANjs
app.route('/api/auth/facebook').get(users.oauthCall('facebook', {
scope: ['email']
}));
app.route('/api/auth/facebook/callback').get(users.oauthCallback('facebook'));
I've checked the callbacks in the facebook app setup and they're fine. Totally stumped. Would love any help or advice.
Thanks.
The comments by #user3632710 led me to the issue that was indeed a URL concatenation issue ass #Paul suggested. The offending code is at line 121 of modules/users/server/controllers/users/users.authentication.server.controller.js
which is: return res.redirect(redirectURL || sessionRedirectURL || '/');
for now i've just commented this out and redirected to the root, which is fine for my purposes but inelegant generally:
return res.redirect('/');
Thanks for all your help, hope this helps someone else.
Whatever code is building your URL is clearly not doing it right. It looks like you're calling toString() (directly or indirectly) on an object, and that's being concatenated with the URL in question, which your server-side routes don't know how to handle. The code you've posted is incomplete for helping us find the error for you, but I'd look in whatever logic is building that URL.
Iam trying to store the state in thedb through webservice.
Iam using Http State Provider to do so.
Iam getting an error in the following line saying object expected.
Ext.state.Manager.setProvider(new Ext.state.HttpProvider({ url: 'GetGridState.asmx/readdata' }));
Please help me in this issue.
You should probably use firebug or even alerts if nothing else to see if maybe you're not passing an object where you should be.
Are you using the correct version of ExtJS? It looks like there is no more Ext.state.HttpProvider in ExtJS 3.1.
Sounds like you have not included the HttpStateProvider class code correctly, or included it after the code that is trying to use it. Double-check that if you are referring to an external js file, it is loaded properly and in the right order.