chjj / tty.js

A terminal for your browser, using node/express/socket.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem installing with node v0.12

krusta80 opened this issue · comments

I was able to sniff out an issue with the installation pty.js (header change on line 39), but I'm still getting errors about pty.js when trying to install tty.js and was hoping you could point this noob in the right direction...

Here are the last few lines that I get from npm:

gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 2.6.18-308.4.1.el5
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/OMbin/node/node_modules/tty.js/node_modules/pty.js
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

ws@0.4.32 install /usr/OMbin/node/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory /usr/OMbin/node/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished COPY Release/bufferutil.node CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node SOLINK_MODULE(target) Release/obj.target/validation.node: Finished COPY Release/validation.node make: Leaving directory/usr/OMbin/node/node_modules/tty.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
npm ERR! Linux 2.6.18-308.4.1.el5
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "git+https://github.com/chjj/tty.js.git"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! pty.js@0.2.4 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js@0.2.4 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pty.js
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /usr/OMbin/node/npm-debug.log

Just for anyone as stuck as I was, make your life simple and keep node.js below version 11 when trying to get this up and running. I spent a long time trying to get it to work with v12, but in the end I bit the bullet and reverted to v0.10.34

:)

I've been running tty.js for months in a variety of virtual machines, but rebuilding one today with presumably a new version of node is breaking on pty.js with:

Error: Execution of '/usr/local/bin/npm install --global tty.js' returned 1: > pty.js@0.2.3 install /usr/local/lib/node_modules/tty.js/node_modules/pty.js
==> tm351lts: > node-gyp rebuild
==> tm351lts: 
==> tm351lts: gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/vagrant/.node-gyp/0.12.0"
==> tm351lts: gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/tty.js/node_modules/pty.js/.node-gyp"
==> tm351lts: child_process: customFds option is deprecated, use stdio instead.
==> tm351lts: make: Entering directory `/usr/local/lib/node_modules/tty.js/node_modules/pty.js/build'
==> tm351lts:   CXX(target) Release/obj.target/pty/src/unix/pty.o
...
commented

Any update for this error as i am also having the same problem during installation ( node -v 0.12.0 )??

I ended up using nvm to push back to an old version of node:

  exec { 'node-install':
        command => '/bin/bash -c "source /home/vagrant/.nvm/nvm.sh && nvm install 0.10.35 && npm install tty.js && touch /root/ttyjs.done"',
        environment=>['HOME=/home/vagrant/'],
        require => Exec['nvm-install'],
        creates=> '/root/ttyjs.done'
    }

+1.. Updates on this? I MUST use node 0.12.x

Works great for me with node 0.12.7 under Ubuntu.
Since the other post are a bit outdated, what errors do you get?

Additionally, maybe updated dependencies in the package.json file will help:
"pty.js": "0.2.8",
"term.js": "0.0.5"

Yes, with an updated version of pty,js, it works great.
Thank you!