簡體   English   中英

小袋鼠和原型錯誤

[英]Wallaby and prototype error

問題是原型未定義,盡管在節點控制台中編寫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)

我測試了上面的代碼,它的工作原理。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM