Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/24.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
Node.js 如何解决无法读取属性';原型&x27;未定义的_Node.js_Reactjs_Express - Fatal编程技术网

Node.js 如何解决无法读取属性';原型&x27;未定义的

Node.js 如何解决无法读取属性';原型&x27;未定义的,node.js,reactjs,express,Node.js,Reactjs,Express,TypeError:无法读取未定义的属性“prototype” 联系keeper/client/node_modules/express/lib/response.js:42 39 | * @public 40 | */ 41 | > 42 | var res = Object.create(http.ServerResponse.prototype) 43 | 44 | /** 45 | * Module exports. 尝试添加 target: '

TypeError:无法读取未定义的属性“prototype”

联系keeper/client/node_modules/express/lib/response.js:42

  39 |  * @public
  40 |  */
  41 | 
> 42 | var res = Object.create(http.ServerResponse.prototype)
  43 | 
  44 | /**
  45 |  * Module exports.
尝试添加

target: 'node'

到你的网页配置

我不认为这会发生,除非某些模块已损坏或模块版本不匹配。我建议删除Express模块及其所有依赖项,然后重新安装。如果单独安装了
http
模块,则还应删除该模块并重新安装。另外,请确保您没有任何自己的代码分配给
http.ServerResponse
@Hamza-Iftikhar。您能找到解决方案吗?