util.erbt wirft TypeError: Cannot read property 'Prototyp' undefined

app.js

var Website = new require( './jslib/website.js' );

./jslib/website.js

var util = require('util'),
    events = require('events');

module.exports = Website;
function Website()
{
    events.EventEmitter.call( this );
    return this;
}
util.inherits( Website, events.EventEmiter );

Die Ausgabe Der Konsole

PATH_TO_APPDIR>node app.js

util.js:538
  ctor.prototype = Object.create(superCtor.prototype, {
                                          ^
TypeError: Cannot read property 'prototype' of undefined
    at Object.exports.inherits (util.js:538:43)
    at Object.<anonymous> (PATH_TO_APPDIR\jslib\website.js:9:6)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at new require (module.js:378:17)
    at Object.<anonymous> (PATH_TO_APPDIR\app.js:1:16)
    at Module._compile (module.js:449:26)

Dies ist NodeJS 8.22 auf Windows 7*

  • Danke für die Erinnerung
InformationsquelleAutor HyderA | 2013-03-12
Schreibe einen Kommentar