After trying everything in this post, i was unsuccessful. But I found a solution that worked for me.I was able to solve it without using the body-parser and only with the express.It looked like this:
const express = require('express'); const app = express();app.use(express.json({limit: '25mb'}));app.use(express.urlencoded({limit: '25mb', extended: true}));
Don't forget to use extended: true to remove the deprecated message from the console.