I am working on a project which requires form submission (Registration and Login), my server is working properly and also connected to my MongoDB every other thing works fine but while trying to submit the form input it throws an error. InternalServerError: stream not readable.
What could be the issue
// For Passing Application JSON
app.use(express.urlencoded({extended:true}));
app.use(express.json());
// Set Cookie Parser, Session and Flash
app.use(cookieParser(process.env.COOKIES_PARSER_SECERET));
app.use(session({
secret : process.env.COOKIES_SECRET,
cookie: {maxAge:60000},
resave: true,
saveUninitialized: true
}));
Server started on port 5000
MongoDB Connected....
InternalServerError: stream is not readable
at readStream (C:\Users\ED JOSE\Documents\Loctech - Car Booking Web Application\node_modules\raw-body\index.js:178:17)
at getRawBody (C:\Users\ED JOSE\Documents\Loctech - Car Booking Web Application\node_modules\raw-body\index.js:109:12)
at read (C:\Users\ED JOSE\Documents\Loctech - Car Booking Web Application\node_modules\body-parser\lib\read.js:79:3)
at urlencodedParser (C:\Users\ED JOSE\Documents\Loctech - Car Booking Web Application\node_modules\body-parser\lib\types\urlencoded.js:116:5)
at Layer.handle [as handle_request] (C:\Users\ED JOSE\Documents\Loctech - Car Booking Web Application\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Users\ED JOSE\Documents\Loctech - Car Booking Web Application\node_modules\express\lib\router\index.js:328:13)
at C:\Users\ED JOSE\Documents\Loctech - Car Booking Web Application\node_modules\express\lib\router\index.js:286:9
at Function.process_params (C:\Users\ED JOSE\Documents\Loctech - Car Booking Web Application\node_modules\express\lib\router\index.js:346:12)
at next (C:\Users\ED JOSE\Documents\Loctech - Car Booking Web Application\node_modules\express\lib\router\index.js:280:10)
at serveStatic (C:\Users\ED JOSE\Documents\Loctech - Car Booking Web Application\node_modules\serve-static\index.js:75:16)