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

File is missing '../build/Release/pty.node' #89

Open
omarragi opened this issue Sep 18, 2014 · 8 comments
Open

File is missing '../build/Release/pty.node' #89

omarragi opened this issue Sep 18, 2014 · 8 comments

Comments

@omarragi
Copy link

after installing tty.js
pty.js/lib/pty.js is pointing to a file that doesn't exist

/**

  • pty.js
  • Copyright (c) 2012, Christopher Jeffrey (MIT License)
  • Binding to the pseudo terminals.
    */

var net = require('net');
var tty = require('tty');
var extend = require('extend');
var pty = require('../build/Release/pty.node');

module.js:340
throw err;
^
Error: Cannot find module '../build/Release/pty.node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/oragi/tt/node_modules/tty.js/node_modules/pty.js/lib/pty.js:10:11)
at Module._compile (module.js:456:26)

@jshkurti
Copy link

It means pty.js native code (/src/unix/pty.cc) hasn't been compiled.
Try going to /node_modules/pty.js and type make

@omarragi
Copy link
Author

when i do npm install pty.js
I get
[orw-oragi-rh6] oragi:/home/oragi/git/node-v0.10.26-linux-x64/bin$ npm install pty.js
npm http GET https://registry.npmjs.org/pty.js
npm http 200 https://registry.npmjs.org/pty.js
npm http GET https://registry.npmjs.org/extend
npm http GET https://registry.npmjs.org/nan/0.7.0
npm http 304 https://registry.npmjs.org/extend
npm http 304 https://registry.npmjs.org/nan/0.7.0

pty.js@0.2.4 install /home/oragi/git/node-v0.10.26-linux-x64/bin/node_modules/pty.js
node-gyp rebuild

make: Entering directory /home/oragi/git/node-v0.10.26-linux-x64/bin/node_modules/pty.js/build' make: Nothing to be done forall'.
make: Leaving directory `/home/oragi/git/node-v0.10.26-linux-x64/bin/node_modules/pty.js/build'
pty.js@0.2.4 node_modules/pty.js
├── extend@1.2.1
└── nan@0.7.0

I'm on Redhat 6.4

@jshkurti
Copy link

make clean && make

@omarragi
Copy link
Author

[orw-oragi-rh6] oragi:/home/oragi/delme/node_modules/pty.js$ make clean
make[1]: Entering directory /home/oragi/delme/node_modules/pty.js' make[1]: Leaving directory/home/oragi/delme/node_modules/pty.js'
[orw-oragi-rh6] oragi:/home/oragi/delme/node_modules/pty.js$ make install
make: *** No rule to make target install'. Stop. [orw-oragi-rh6] oragi:/home/oragi/delme/node_modules/pty.js$ make make[1]: Entering directory/home/oragi/delme/node_modules/pty.js'
node-waf configure build
make[1]: node-waf: Command not found
make[1]: *** [waf] Error 127
make[1]: Leaving directory /home/oragi/delme/node_modules/pty.js' make: *** [all] Error 2 [orw-oragi-rh6] oragi:/home/oragi/delme/node_modules/pty.js$ make clean make[1]: Entering directory/home/oragi/delme/node_modules/pty.js'
make[1]: Leaving directory /home/oragi/delme/node_modules/pty.js' [orw-oragi-rh6] oragi:/home/oragi/delme/node_modules/pty.js$ make make[1]: Entering directory/home/oragi/delme/node_modules/pty.js'
node-waf configure build
make[1]: node-waf: Command not found
make[1]: *** [waf] Error 127
make[1]: Leaving directory `/home/oragi/delme/node_modules/pty.js'
make: *** [all] Error 2

@omarragi
Copy link
Author

my versions

[orw-oragi-rh6] oragi:/home/oragi/delme/node_modules/pty.js$ npm -v
1.4.3
[orw-oragi-rh6] oragi:/home/oragi/delme/node_modules/pty.js$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
[orw-oragi-rh6] oragi:/home/oragi/delme/node_modules/pty.js$ env python -V
Python 2.7.6

@jshkurti
Copy link

npm install -g node-gyp

@omarragi
Copy link
Author

still "Nothing to be done for `all'."

make gyp
node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@0.10.26 | linux | x64
gyp info spawn python
gyp info spawn args [ '/home/oragi/git/node-v0.10.26-linux-x64/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/tmp/pty.js/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/oragi/git/node-v0.10.26-linux-x64/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/oragi/.node-gyp/0.10.26/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/oragi/.node-gyp/0.10.26',
gyp info spawn args '-Dmodule_root_dir=/tmp/pty.js',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok
node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@0.10.26 | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make[1]: Entering directory /tmp/pty.js/build' make[1]: Nothing to be done forall'.
make[1]: Leaving directory `/tmp/pty.js/build'
gyp info ok

@lordnynex
Copy link

Hello,

Thanks for the cool module. It will replace many janky bash scripts.

I ran into this issue and spent the last hour trying to figure out why node-gyp was being so stubborn. Turns out, I built node (0.12.2) awhile back with debug symbols. In turn, node-gyp compiles this module only in Debug.

The solution is to cd into the module dir make clean && node-gyp configure --release && node-gyp build

I didn't realize node-gyp did this.

Edit: For clarity, this does compile. It just compiles to '../build/Debug/pty.node'

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

3 participants