WEBIDE error when starting #178

Closed
Steakschen opened this Issue Mar 25, 2013 · 9 comments

Projects

None yet

4 participants

@Steakschen

Hello i get the following after installing manually:

root@raspberrypi /var/www/Adafruit-WebIDE # node server.js

module.js:356
Module._extensions[extension](this, filename);
^
Error: Symbol pty_module not found.
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/var/www/Adafruit-WebIDE/node_modules/tty.js/node_modules/pty.js/lib/pty.js:8:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
root@raspberrypi /var/www/Adafruit-WebIDE # npm install pty_module
npm http GET https://registry.npmjs.org/pty_module
npm http 404 https://registry.npmjs.org/pty_module
npm ERR! 404 'pty_module' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Linux 3.2.27+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pty_module"
npm ERR! cwd /var/www/Adafruit-WebIDE
npm ERR! node -v v0.10.1
npm ERR! npm -v 1.2.15
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/Adafruit-WebIDE/npm-debug.log
npm ERR! not ok code 0
root@raspberrypi /var/www/Adafruit-WebIDE #

any idea?

@jwcooper
Member

Try:

npm install pty.js

I'm not quite sure why that failed in the first place though. tty.js depends on pty.js. There should be this path:

node_modules/tty.js/node_modules/pty.js
@jwcooper
Member
jwcooper commented Apr 9, 2013

Closing this...let me know if you need more help. Thanks!

@jwcooper jwcooper closed this Apr 9, 2013
@7Ds7
7Ds7 commented Apr 18, 2013

I got the same problem and the path node_modules/tty.js/node_modules/pty.js exists as well as node_modules/pty.js after installing pty.js trough npm

module.js:356
Module._extensions[extension](this, filename);
^
Error: Symbol pty_module not found.
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/share/adafruit/webide/node_modules/tty.js/node_modules/pty.js/lib/pty.js:8:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

@jimzim
jimzim commented Apr 26, 2013

I am seeing same issue even after running npm install pty.js

module.js:356
Module._extensions[extension](this, filename);
^
Error: Symbol pty_module not found.
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/root/dev/Adafruit-WebIDE/node_modules/tty.js/node_modules/pty.js/lib/pty.js:8:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

@jimzim
jimzim commented Apr 26, 2013

I added this line of code from this merge request to the pty.cc file and rebuilt it and now it works.

chjj/pty.js#26

clehner/pty.js@2952bcd

NODE_MODULE(pty, init);

@jwcooper jwcooper reopened this Apr 26, 2013
@jwcooper
Member

Thank you for discovering this fix. I've updated my tty.js branch for the pty.js changes. Next release will have this included.

Also, what version of node.js are you using?

@jwcooper jwcooper closed this Apr 26, 2013
@jimzim
jimzim commented Apr 26, 2013

we are using 0.10.1 on Arch Linux.

Also got this error after fixing the above issue. Might be worth creating a new github issue since it is not related i don't think.

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:160:15)
at EventEmitter.once (events.js:179:8)
at Transport.logException (/root/dev/Adafruit-WebIDE/node_modules/winston/lib/winston/transports/transport.js:117:8)
at logAndWait (/root/dev/Adafruit-WebIDE/node_modules/winston/lib/winston/logger.js:613:15)
at /root/dev/Adafruit-WebIDE/node_modules/winston/node_modules/async/lib/async.js:86:13
at Array.forEach (native)
at _forEach (/root/dev/Adafruit-WebIDE/node_modules/winston/node_modules/async/lib/async.js:26:24)
at Object.async.forEach (/root/dev/Adafruit-WebIDE/node_modules/winston/node_modules/async/lib/async.js:85:9)
at Logger._uncaughtException (/root/dev/Adafruit-WebIDE/node_modules/winston/lib/winston/logger.js:636:9)
at process.EventEmitter.emit (events.js:117:20)

@jwcooper
Member

Does the WebIDE work at all under Arch? I've actually never tested with Arch.

Also, does that error prevent the WebIDE from functioning, or is it just thrown as you're using it?

It appears to be related to the following: winstonjs/winston#218

You can try fixing it by commenting out line 49 in the server.js file:

//winston.handleExceptions(new winston.transports.File({ filename: __dirname + '/logs/errors.log', json: false }));
@jimzim
jimzim commented Apr 26, 2013

Just started getting into Pi, so never seen anything but Arch Linux and never knew about the IDE until last night, so no. I was told that Arch was more stable, but I am going to try all of the distros and see which one I like the best. :)

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