Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'SOCKET' of undefined #27

Open
ghost opened this issue May 20, 2020 · 2 comments
Open

Cannot read property 'SOCKET' of undefined #27

ghost opened this issue May 20, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented May 20, 2020

Hello, when I execute /run < command >, the bot will report an error. To execute another command, such as /cd, the bot works normally.

/root/shell-bot/node_modules/node-pty/lib/unixTerminal.js:269
        var handle = new Pipe(constants.SOCKET);
                                       ^

TypeError: Cannot read property 'SOCKET' of undefined
    at new PipeSocket (/root/shell-bot/node_modules/node-pty/lib/unixTerminal.js:269:40)
    at new UnixTerminal (/root/shell-bot/node_modules/node-pty/lib/unixTerminal.js:94:25)
    at Object.spawn (/root/shell-bot/node_modules/node-pty/lib/index.js:28:12)
    at new Command (/root/shell-bot/lib/command.js:22:18)
    at Bot.<anonymous> (/root/shell-bot/server.js:192:25)
    at Bot.<anonymous> (/root/shell-bot/node_modules/botgram/lib/message.js:87:22)
    at HandlerQueue.callHandler (/root/shell-bot/node_modules/botgram/lib/message.js:63:29)
    at Bot.<anonymous> (/root/shell-bot/node_modules/botgram/lib/message.js:86:43)
    at HandlerQueue.callHandler (/root/shell-bot/node_modules/botgram/lib/message.js:63:29)
    at Bot.<anonymous> (/root/shell-bot/node_modules/botgram/lib/message.js:86:43)
@mildsunrise
Copy link
Member

are you sure that npm install finished correctly?

@ghost
Copy link
Author

ghost commented May 20, 2020

are you sure that npm install finished correctly?

It may be because the nodejs version(V6) is too low. After upgrading the nodejs version, the bot can run normally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant