We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to use express-useragent with NodeJS/Express/TypeScript and getting this error.
Code:
app.get("/chat", keycloak.protect(), async (req, res) => { let chatController = new ChatController(); let url = await chatController.openAppChat(req.useragent, channeluserId, merchantName); res.redirect(url); });
The text was updated successfully, but these errors were encountered:
Facing the same issue.
Sorry, something went wrong.
Try installing types npm i -D @types/express-useragent
npm i -D @types/express-useragent
Facing same issue I tried creating a global types file as well and this doesn't solve it, neither does @Narendra67 answer.
import express from "express" export default interface IRequest extends express.Request { useragent?: any; }
Creating a separate file and importing it higher up solved this issue:
declare global { namespace Express { interface Request { useragent?: any } } }
No branches or pull requests
Trying to use express-useragent with NodeJS/Express/TypeScript and getting this error.
Code:
The text was updated successfully, but these errors were encountered: