devtools-terminal icon indicating copy to clipboard operation
devtools-terminal copied to clipboard

install failure

Open federicobucchi opened this issue 9 years ago • 9 comments

After the command:

npm install -g devtools-terminal

I get:

> [email protected] install /usr/local/lib/node_modules/devtools-terminal/node_modules/pty.js
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/var/root/.node-gyp/0.10.32"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/devtools-terminal/node_modules/pty.js/.node-gyp"
-         CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:487:10: error: use of undeclared identifier 'openpty'
  return openpty(amaster, aslave, name, (termios *)termp, (winsize *)winp);
         ^
../src/unix/pty.cc:533:10: error: use of undeclared identifier 'forkpty'
  return forkpty(amaster, name, (termios *)termp, (winsize *)winp);
         ^
2 errors generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
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:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/devtools-terminal/node_modules/pty.js
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok

> [email protected] install /usr/local/lib/node_modules/devtools-terminal/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  SOLINK_MODULE(target) Release/bufferutil.node: Finished
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished

> [email protected] install /usr/local/lib/node_modules/devtools-terminal/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  SOLINK_MODULE(target) Release/bufferutil.node: Finished
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
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! System Darwin 13.3.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "devtools-terminal"
npm ERR! cwd /private/var/root
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

federicobucchi avatar Oct 04 '14 05:10 federicobucchi

+1

Sitin avatar Oct 09 '14 09:10 Sitin

+1

omnidan avatar Oct 09 '14 14:10 omnidan

+1

vito-c avatar Oct 22 '14 08:10 vito-c

+1

nicksrandall avatar Oct 30 '14 17:10 nicksrandall

Okay, if you guys could read, you would notice that there are clear instructions on what to do in such circumstances:

npm ERR! Failed at the [email protected] install script.
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.

petethepig avatar Oct 30 '14 17:10 petethepig

Also, first link in google: http://stackoverflow.com/questions/24949902/errors-installing-pty-js-node

petethepig avatar Oct 30 '14 17:10 petethepig

@petethepig should put it on documentation / README?

hengkiardo avatar Nov 04 '14 04:11 hengkiardo

Well I am a bit confused here because I seem to be able to compile pty.js when I cd there and run make. Is there something I need to do with npm to force it to update. /usr/local/lib/lib/node_modules/pty.js/$ make

node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/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   '/usr/local/lib/node_modules/pty.js/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/vito-c/.node-gyp/0.10.33/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/vito-c/.node-gyp/0.10.33',
gyp info spawn args   '-Dmodule_root_dir=/usr/local/lib/node_modules/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 [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make[2]: Nothing to be done for `all'.
gyp info ok

however installing devtools-terminal still fails /usr/local/lib/lib/node_modules/pty.js/$ npm install -g devtools-terminal

Now I don't know much about npm/node but the interesting piece to me is right here install /usr/local/lib/node_modules/devtools-terminal/node_modules/pty.js

It looks like it's trying to install pty.js into devtools-terminal/node_modules instead of using the one already compiled on my system? I'm going to open up a ticket on pty.js

I'm using homebrew to install node if that means anything

> [email protected] install /usr/local/lib/node_modules/devtools-terminal/node_modules/pty.js
> node-gyp rebuild

  CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:487:10: error: use of undeclared identifier 'openpty'
  return openpty(amaster, aslave, name, (termios *)termp, (winsize *)winp);
         ^
../src/unix/pty.cc:533:10: error: use of undeclared identifier 'forkpty'
  return forkpty(amaster, name, (termios *)termp, (winsize *)winp);
         ^
2 errors generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
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:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/devtools-terminal/node_modules/pty.js
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

> [email protected] install /usr/local/lib/node_modules/devtools-terminal/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  SOLINK_MODULE(target) Release/bufferutil.node: Finished
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished
npm ERR! Darwin 13.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "devtools-terminal"
npm ERR! node v0.10.33
npm ERR! npm  v2.1.7
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
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/local/lib/node_modules/pty.js/npm-debug.log

vito-c avatar Nov 08 '14 20:11 vito-c

I can confirm that the answer http://stackoverflow.com/a/24981514 works.

stephanebachelier avatar Dec 11 '14 09:12 stephanebachelier