Keatinge Keatinge - 4 years ago 306
Javascript Question

(node:5132) DeprecationWarning: `DEBUG_FD` is deprecated. with bodyParser

I am using express and bodyParser to get POST data on an express webserver.

The smallest example which replicates the error is this:

var bodyParser = require('body-parser');
var express = require("express");

var app = express();
app.use(bodyParser.urlencoded({extended: true}));

What happens is it prints out an error:

"C:\Program Files (x86)\JetBrains\WebStorm 2016.1.1\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" test.js
(node:5132) DeprecationWarning: `DEBUG_FD` is deprecated. Override `debug.log` if you want to use a different log function (

Process finished with exit code 0

It only happens when I include bodyParser. Even with the error everything still works, the program still runs fine. I just want to get rid of this annoying message. I've googled around have found this from when it was deprecated:

The problem is I have no idea what DEBUG_FD is, apparently it's an environment variable, I've tried to turn it off with this in terminal:

> node
> process.env["DEBUG_FD"] = false

Still didn't fix it. Any ideas?

Answer Source

This variable is set by WebStorm. Jetbrains remove this in 2017, march.

You can manually unset this variable:

// top of file
delete process.env["DEBUG_FD"];

var bodyParser = require('body-parser');
var express = require("express");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download