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 (https://git.io/vMUyr)
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: https://github.com/visionmedia/debug/issues/386
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
false
Still didn't fix it. Any ideas?
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");
...