Skip to content

TypeError: Cannot read property 'prototype' of undefined #168

Description

@blackmiaool

/.nvm/versions/node/v7.1.0/lib/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js:449
Parser.prototype.proto = EventEmitter.prototype;
^

TypeError: Cannot read property 'prototype' of undefined
at Object. (/home/blackmiaool/.nvm/versions/node/v7.1.0/lib/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js:449:42)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object. (/home/blackmiaool/.nvm/versions/node/v7.1.0/lib/node_modules/tty.js/node_modules/socket.io/lib/transports/websocket/index.js:7:6)
at Module._compile (module.js:573:32)

Solution:
1 Enter ~/.nvm/versions/node/v7.1.0/lib/node_modules/tty.js/node_modules/socket.io/lib/ (change v7.1.0 to your node edition or redirect it to your node folder it you don't use nvm)
2 Replace "EventEmitter = process.EventEmitter" with "EventEmitter = require('events')"
3 Save and retry.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions