小袋鼠和原型错误

原型是没有定义,虽然在节点控制台编写http.IncomingMessage.prototype确实给一个对象作为输出。 有任何想法吗 ?

var req = Object.create(http.IncomingMessage.prototype) Uncaught TypeError: Cannot read property 'prototype' of undefined at http://localhost:62625/____wallaby-bundle.js?1501265946287&wallabyFileId=bundle:219253 

我认为http.IncomingMessage是未定义的。

有可能发生http在你的代码中被覆盖的地方。

 var http = require('http'); var req = Object.create(http.IncomingMessage.prototype) 

我已经testing了上面的代码,它的工作原理。