Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/367.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript (节点:5132)弃用警告:`DEBUG_FD`已弃用。使用bodyParser_Javascript_Node.js_Express_Webstorm_Body Parser - Fatal编程技术网

Javascript (节点:5132)弃用警告:`DEBUG_FD`已弃用。使用bodyParser

Javascript (节点:5132)弃用警告:`DEBUG_FD`已弃用。使用bodyParser,javascript,node.js,express,webstorm,body-parser,Javascript,Node.js,Express,Webstorm,Body Parser,我正在使用express和bodyParser在express Web服务器上获取POST数据 复制错误的最小示例如下: var bodyParser = require('body-parser'); var express = require("express"); var app = express(); app.use(bodyParser.urlencoded({extended: true})); 发生的情况是打印出一个错误: "C:\Program Files (x86)\Je

我正在使用express和bodyParser在express Web服务器上获取POST数据

复制错误的最小示例如下:

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

var app = express();
app.use(bodyParser.urlencoded({extended: true}));
发生的情况是打印出一个错误:

"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
它只在我包含bodyParser时发生。即使有错误,一切都正常,程序仍然运行良好。我只是想摆脱这个烦人的信息。我在谷歌上搜索了一下,发现了这张不推荐使用的照片:

问题是我不知道DEBUG_FD是什么,显然它是一个环境变量,我尝试在终端中关闭它:

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

还是没修好。有什么想法吗?

此变量由WebStorm设置。Jetbrains于2017年3月将其移除

您可以手动取消设置此变量:

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

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