업데이트 한 후에 나는 NPM을 업데이트 한 지금 내 코드는 다음과 같은 오류 (참조하십시오 그림) 반환 :EventEmitter 오류 NPM 3.10
Error Message 누군가가 범인을 식별하는 지침을 제공하시기 바랍니다 수 있습니까? 내 의혹은 그것이 익숙하지 않은 상속과 관련이 있다는 것이다.
/**
* Expose the constructor.
*/
exports = module.exports = Store;
/**
* Module dependencies.
*/
var EventEmitter = process.EventEmitter;
/**
* Store interface
*
* @api public
*/
function Store (options) {
this.options = options;
this.clients = {};
};
/**
* Inherit from EventEmitter.
*/
Store.prototype.__proto__ = EventEmitter.prototype;
/**
* Initializes a client store
*
* @param {String} id
* @api public
*/
Store.prototype.client = function (id) {
if (!this.clients[id]) {
this.clients[id] = new (this.constructor.Client)(this, id);
}
return this.clients[id];
};
/**
* Destroys a client
*
* @api {String} sid
* @param {Number} number of seconds to expire client data
* @api private
*/
Store.prototype.destroyClient = function (id, expiration) {
if (this.clients[id]) {
this.clients[id].destroy(expiration);
delete this.clients[id];
}
return this;
};
/**
* Destroys the store
*
* @param {Number} number of seconds to expire client data
* @api private
*/
Store.prototype.destroy = function (clientExpiration) {
var keys = Object.keys(this.clients)
, count = keys.length;
for (var i = 0, l = count; i < l; i++) {
this.destroyClient(keys[i], clientExpiration);
}
this.clients = {};
return this;
};
/**
* Client.
*
* @api public
*/
Store.Client = function (store, id) {
this.store = store;
this.id = id;
};
deprecation 경고도 표시되지 않았으므로 _ "process.EventEmitter는 더 이상 사용되지 않습니다. 대신 require ('events')를 사용하십시오."_? – robertklep
경고가 없으므로 안내해 주셔서 감사합니다. – user2832956