Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

npm run install-all fails on child_pty build on OSX El Capitan 10.11 Beta (15A278b) #27

Closed
oaleynik opened this issue Sep 6, 2015 · 24 comments
Labels

Comments

@oaleynik
Copy link

oaleynik commented Sep 6, 2015

I managed to fix it already and creating this issue just in case if somebody else will face it. This is fixed by installing latest command line tools from here https://developer.apple.com/downloads/ (at the moment of reporting this issue it was Command Line Tools OS X 10.11 for Xcode 7 beta 6)

@ghost
Copy link

ghost commented Sep 6, 2015

for me its not fixed when using most recent cmd line tools.

npm run install-all

> black-screen@0.0.1 install-all /Users/fibric/Projects/javascript/black-screen
> PATH=node_modules/.bin:$PATH rm -rf node_modules && npm install && bower install && npm run rebuild-pty


> child_pty@1.0.0 install /Users/fibric/Projects/javascript/black-screen/node_modules/child_pty
> node-gyp rebuild

  CXX(target) Release/obj.target/exechelper/src/exechelper.o
  LINK(target) Release/exechelper
  CXX(target) Release/obj.target/pty/src/pty.o
In file included from ../src/pty.cpp:1:
../node_modules/nan/nan.h:324:27: error: redefinition of 'NanEnsureHandleOrPersistent'
  NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                          ^

> fsevents@0.3.8 install /Users/fibric/Projects/javascript/black-screen/node_modules/babel/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"3.3.0","npm":"2.13.3"})

> electron-prebuilt@0.30.0 postinstall /Users/fibric/Projects/javascript/black-screen/node_modules/electron-prebuilt
> node install.js

npm WARN prefer global react-tools@0.13.3 should be installed with -g
|
> node-sass@3.3.2 install /Users/fibric/Projects/javascript/black-screen/node_modules/gulp-sass/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /Users/fibric/Projects/javascript/black-screen/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-45/binding.node
npm WARN prefer global bower@1.4.1 should be installed with -g

> node-sass@3.3.2 postinstall /Users/fibric/Projects/javascript/black-screen/node_modules/gulp-sass/node_modules/node-sass
> node scripts/build.js

` /Users/fibric/Projects/javascript/black-screen/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-45/binding.node ` exists.
 testing binary.
Binary is fine; exiting.
npm WARN prefer global babel@5.6.23 should be installed with -g
npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/fibric/.nvm/versions/io.js/v3.3.0/bin/iojs" "/Users/fibric/.nvm/versions/io.js/v3.3.0/bin/npm" "install"
npm ERR! node v3.3.0
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE

npm ERR! child_pty@1.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the child_pty@1.0.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the child_pty 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 child_pty
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/fibric/Projects/javascript/black-screen/npm-debug.log

npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/fibric/.nvm/versions/io.js/v3.3.0/bin/iojs" "/Users/fibric/.nvm/versions/io.js/v3.3.0/bin/npm" "run" "install-all"
npm ERR! node v3.3.0
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! black-screen@0.0.1 install-all: `PATH=node_modules/.bin:$PATH rm -rf node_modules && npm install && bower install && npm run rebuild-pty`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the black-screen@0.0.1 install-all script 'PATH=node_modules/.bin:$PATH rm -rf node_modules && npm install && bower install && npm run rebuild-pty'.
npm ERR! This is most likely a problem with the black-screen package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     PATH=node_modules/.bin:$PATH rm -rf node_modules && npm install && bower install && npm run rebuild-pty
npm ERR! You can get their info via:
npm ERR!     npm owner ls black-screen
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/fibric/Projects/javascript/black-screen/npm-debug.log

black-screen cf88802
OSX v10.11 Beta 8 (15A279b)
Xcode v7.0 beta 6 (7A192o)
node v3.3.0 [iojs]
npm v2.13.3 [iojs]

@mdeland
Copy link

mdeland commented Sep 6, 2015

I'm seeing the same error as @fibric but on
OSX 10.10.5
XCode 6.4
node v3.0.0 (iojs)
npm 2.13.3

@mhartington
Copy link

Seeing this as well, same specs as @mdeland

@mattfaluotico
Copy link

I had this issue, I switched from io.js to node and it was resolved. node-gyp doesn't play nicely with io.js

@mdeland
Copy link

mdeland commented Sep 6, 2015

confirmed! that did fix the problem for me.

@ghost
Copy link

ghost commented Sep 7, 2015

will be interesting to see what will happen when node v4.0 is released this month. because 4.0 is nothing else than io.js v3 :)

@rsms
Copy link

rsms commented Sep 7, 2015

Fails on 10.10.5 as well:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/iojs',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'install-all' ]
2 info using npm@2.13.3
3 info using node@v3.1.0
4 verbose run-script [ 'preinstall-all', 'install-all', 'postinstall-all' ]
5 info preinstall-all black-screen@0.0.1
6 info install-all black-screen@0.0.1
7 verbose unsafe-perm in lifecycle true
8 info black-screen@0.0.1 Failed to exec install-all script
9 verbose stack Error: black-screen@0.0.1 install-all: `rm -rf node_modules && npm install && bower install && npm run rebuild-pty`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:764:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid black-screen@0.0.1
11 verbose cwd /Users/rasmus/src2/black-screen
12 error Darwin 14.5.0
13 error argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "run" "install-all"
14 error node v3.1.0
15 error npm  v2.13.3
16 error code ELIFECYCLE
17 error black-screen@0.0.1 install-all: `rm -rf node_modules && npm install && bower install && npm run rebuild-pty`
17 error Exit status 1
18 error Failed at the black-screen@0.0.1 install-all script 'rm -rf node_modules && npm install && bower install && npm run rebuild-pty'.
18 error This is most likely a problem with the black-screen package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     rm -rf node_modules && npm install && bower install && npm run rebuild-pty
18 error You can get their info via:
18 error     npm owner ls black-screen
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

uname -a:
Darwin - 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

MacBookPro11,2

@joshwiens
Copy link

Same Issue here - OSX El Capitan 10.11 Beta

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'run', 'install-all' ]
2 info using npm@2.14.2
3 info using node@v0.12.7
4 verbose run-script [ 'preinstall-all', 'install-all', 'postinstall-all' ]
5 info preinstall-all black-screen@0.0.1
6 info install-all black-screen@0.0.1
7 verbose unsafe-perm in lifecycle true
8 info black-screen@0.0.1 Failed to exec install-all script
9 verbose stack Error: black-screen@0.0.1 install-all: `rm -rf node_modules && npm install && bower install && npm run rebuild-pty`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1015:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid black-screen@0.0.1
11 verbose cwd /Users/joshuaw/develop/osxtools/black-screen
12 error Darwin 15.0.0
13 error argv "node" "/usr/local/bin/npm" "run" "install-all"
14 error node v0.12.7
15 error npm  v2.14.2
16 error code ELIFECYCLE
17 error black-screen@0.0.1 install-all: `rm -rf node_modules && npm install && bower install && npm run rebuild-pty`
17 error Exit status 1
18 error Failed at the black-screen@0.0.1 install-all script 'rm -rf node_modules && npm install && bower install && npm run rebuild-pty'.
18 error This is most likely a problem with the black-screen package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     rm -rf node_modules && npm install && bower install && npm run rebuild-pty
18 error You can get their info via:
18 error     npm owner ls black-screen
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

@fibric @rsms - The following workaround got the build working for me

sudo xcode-select -switch /Library/Developer/CommandLineTools

@ghost
Copy link

ghost commented Sep 7, 2015

@joshtoo that xcode switch doesn't solve that for me. now i'm getting slidly different error message.

npm run install-all

> black-screen@0.0.1 install-all /Users/fibric/Projects/javascript/black-screen
> PATH=node_modules/.bin:$PATH rm -rf node_modules && npm install && bower install && npm run rebuild-pty


> child_pty@1.0.0 install /Users/fibric/Projects/javascript/black-screen/node_modules/child_pty
> node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
  CXX(target) Release/obj.target/pty/src/pty.o
In file included from ../src/pty.cpp:1:
../node_modules/nan/nan.h:324:27: error: redefinition of 'NanEnsureHandleOrPersistent'
  NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                          ^
 ./node_modules/nan/nan.h:319:17: note-
> fsevents@0.3.8 install /Users/fibric/Projects/javascript/black-screen/node_modules/babel/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
  SOLINK_MODULE(target) Release/fse.node
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"3.3.0","npm":"2.13.3"})

> electron-prebuilt@0.30.0 postinstall /Users/fibric/Projects/javascript/black-screen/node_modules/electron-prebuilt
> node install.js

npm WARN prefer global react-tools@0.13.3 should be installed with -g
\
> node-sass@3.3.2 install /Users/fibric/Projects/javascript/black-screen/node_modules/gulp-sass/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /Users/fibric/Projects/javascript/black-screen/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-45/binding.node
npm WARN prefer global bower@1.4.1 should be installed with -g

> node-sass@3.3.2 postinstall /Users/fibric/Projects/javascript/black-screen/node_modules/gulp-sass/node_modules/node-sass
> node scripts/build.js

` /Users/fibric/Projects/javascript/black-screen/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-45/binding.node ` exists.
 testing binary.
Binary is fine; exiting.
npm WARN prefer global babel@5.6.23 should be installed with -g
npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/fibric/.nvm/versions/io.js/v3.3.0/bin/iojs" "/Users/fibric/.nvm/versions/io.js/v3.3.0/bin/npm" "install"
npm ERR! node v3.3.0
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE

npm ERR! child_pty@1.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the child_pty@1.0.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the child_pty 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 child_pty
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/fibric/Projects/javascript/black-screen/npm-debug.log

npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/fibric/.nvm/versions/io.js/v3.3.0/bin/iojs" "/Users/fibric/.nvm/versions/io.js/v3.3.0/bin/npm" "run" "install-all"
npm ERR! node v3.3.0
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! black-screen@0.0.1 install-all: `PATH=node_modules/.bin:$PATH rm -rf node_modules && npm install && bower install && npm run rebuild-pty`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the black-screen@0.0.1 install-all script 'PATH=node_modules/.bin:$PATH rm -rf node_modules && npm install && bower install && npm run rebuild-pty'.
npm ERR! This is most likely a problem with the black-screen package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     PATH=node_modules/.bin:$PATH rm -rf node_modules && npm install && bower install && npm run rebuild-pty
npm ERR! You can get their info via:
npm ERR!     npm owner ls black-screen
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/fibric/Projects/javascript/black-screen/npm-debug.log

i can have only xcode-beta running on 10.11

@rsms
Copy link

rsms commented Sep 7, 2015

xcode-select only affects xcode builds and I hope there are no xcode projects involved in building this node package.

The child_pty extension fails to build for me with a bunch of programmer+config errors like these:

In file included from ../src/pty.cpp:1:
../node_modules/nan/nan.h:324:27: error: redefinition of 'NanEnsureHandleOrPersistent'
  NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                          ^
../node_modules/nan/nan.h:319:17: note: previous definition is here
  v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {

Complete output from building child_pty: https://gist.github.com/rsms/447eb864235f6364f297

@rsms
Copy link

rsms commented Sep 7, 2015

The issues are with a convenience package called "nan", used by child_pty: https://github.com/nodejs/nan

The version used by child_pty appears to be quite different from what I see in the current repo master.

What a mess. (And child_pty is really simple shouldn't need the "nan" abstraction thingy.)

@joshwiens
Copy link

@rsms - Hence why I called it an workaround.

node-gyp rebuild was throwing the build error with Xcode pointing at
screen shot 2015-09-07 at 3 32 17 pm

xcode-select -switch to the path above changes the xcode command line tools location to
screen shot 2015-09-07 at 3 36 32 pm

So while I completely agree it "shouldn't" matter, it does temporarily move me past the build issue.

@alebcay
Copy link

alebcay commented Sep 7, 2015

@rsms, I was having similar issues with child_pty. I found that the build was erroring when I was using non-Apple gcc. My build finally passed after I brew unlink'ed.

@sg-s
Copy link

sg-s commented Sep 8, 2015

@Mattfxyz how did you switch to node from io? I'm getting the same error but i'm pretty sure i never switched from node to io.js

@mhartington
Copy link

Hmm, yeah still having this issue and I have node 0.10x on my machine. Never installed IO

@rsms
Copy link

rsms commented Sep 8, 2015

@sg-s OT, but io.js used to be a separate project, so you'd have iojs and/or nodejs installed. Recently iojs merged back into node (it was a branch of node to begin with.) So don't worry about it.

The issue here seems to be a possibly broken and obviously very complex dependency tree where the current solution is to use a specific compiler (Apple's most recent clang build.)

The authors might consider checking the compiler when running the install script to abort and prompt the user about the limitation, would a different clang be chosen by gyp.

@sg-s
Copy link

sg-s commented Sep 8, 2015

@rsms thanks! i figured so, reading the rest of the thread.

@vlad-shatskyi
Copy link
Contributor

Hey, guys. Please try to install it with the latest master. Note that the install command has changed from npm run install-all to npm install.

@sg-s
Copy link

sg-s commented Sep 8, 2015

@ShockOne thanks, works. i had to install bower though.

@vlad-shatskyi
Copy link
Contributor

@sg-s will fix the bower issue in a moment.

@RobertoUa
Copy link
Contributor

Now it works with iojs 3.3.0

@ghost
Copy link

ghost commented Sep 8, 2015

it also installs on node v4.0

@ghost
Copy link

ghost commented Sep 8, 2015

nvm install v4 --default to get node v4

@ghost ghost mentioned this issue Sep 8, 2015
@jianlongoxf8
Copy link

jianlongoxf8 commented May 3, 2016

Same Issue here

npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-d" "lodash"
npm ERR! node v5.10.1
npm ERR! npm v3.8.3

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

No branches or pull requests