Replies: 4 comments
-
Hey, are you trying to setup cors for the entire app or just a specific route ? For the entire app it look like this: import express from "express";
import cors from "cors";
const app = express();
app.use(cors({credentials:true,origin:true})); |
Beta Was this translation helpful? Give feedback.
-
const router = express(); My router was passed from another file |
Beta Was this translation helpful? Give feedback.
-
This issue will help you: #5987 You should pin the |
Beta Was this translation helpful? Give feedback.
-
Try to use: And verify if the @types of express is installed. |
Beta Was this translation helpful? Give feedback.
-
"@types/express": "^5.0.0",
"express": "^4.21.0",
TS2339: Property 'use' does not exist on type 'Router'
Please help me see what the reason is
Beta Was this translation helpful? Give feedback.
All reactions