Sunday 21 May 2017

Heroku Node.js DeprecationWarning: Using Buffer without `new` will soon stop working

why do I get DeprecationWarning: Using Buffer without new will soon stop working. Use new Buffer(), or preferably Buffer.from(), Buffer.allocUnsafe() or Buffer.alloc() instead. after deploying to heroku or using localhost:5000 When I run it using localhost:3000, it didn't give any error. I'm having trouble in displaying image that I Get from mongolab. Server keep giving me 404 error only for image data. Is the buffer thingy the cause of this error? Because hte images image can be displayed if I use localhost:3000.

Here's my package.json:

{
  "name": "caretel",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "node app.js"
  },
  "main": "app.js",
  "dependencies": {
    "jws": "^3.1.3",
    "body-parser": "~1.15.2",
    "cookie-parser": "~1.4.3",
    "debug": "~2.2.0",
    "ejs": "~2.5.2",
    "express": "~4.14.0",
    "express-jwt": "^5.1.0",
    "jsonwebtoken": "^7.3.0",
    "mongoose": "^4.9.1",
    "morgan": "~1.7.0",
    "multer": "^1.3.0",
    "passport": "^0.3.2",
    "passport-local": "^1.0.0",
    "serve-favicon": "~2.3.0"
  },
  "engines": {
    "node": "7.2.0"
  }
}


via Azinuddin AleleCha

No comments:

Post a Comment