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

Can't install in mac osx #115

Open
bagusflyer opened this issue Apr 18, 2014 · 21 comments
Open

Can't install in mac osx #115

bagusflyer opened this issue Apr 18, 2014 · 21 comments

Comments

@bagusflyer
Copy link

I got errors when I ran the command:

sudo npm install -g tty.js

The error messages are:

pty.js@0.2.3 install /usr/local/lib/node_modules/tty.js/node_modules/pty.js
node-gyp rebuild

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-gyp: command not found
npm ERR! pty.js@0.2.3 install: node-gyp rebuild
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the pty.js@0.2.3 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.

@bagusflyer
Copy link
Author

I installed the node-gyp by:

sudo npm install -g node-gyp

But can't solve the problem.

@bagusflyer
Copy link
Author

Any idea?

@bagusflyer
Copy link
Author

Anybody encounter the same issue?

@ghost
Copy link

ghost commented May 22, 2014

I'm also having a similar problem:

> pty.js@0.2.3 install /Users/ecilteodoro/.nvm/v0.11.13/lib/node_modules/tty.js/node_modules/pty.js
> node-gyp rebuild

  CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:65:15: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
PtyFork(const Arguments&);
              ^~~~~~~~~
              v8::internal::Arguments

But this is just the first of a series of errors, mostly related to node-gyp.
Note: node-gyp and XCode command-line tools are properly installed. OSX Mavericks 10.9.3.

@bagusflyer
Copy link
Author

Yes. I found the node-gyp is installed. You have any workaround to fix the tty.js installation problem?

在 2014年5月22日,下午06:43,arctouch-ecilteodoro notifications@github.com 写道:

I'm also having a similar problem:

pty.js@0.2.3 install /Users/ecilteodoro/.nvm/v0.11.13/lib/node_modules/tty.js/node_modules/pty.js
node-gyp rebuild

CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:65:15: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
PtyFork(const Arguments&);
^~~~~~~~~
v8::internal::Arguments
But this is just the first of a series of errors, mostly related to node-gyp.

Note: node-gyp and XCode command-line tools are properly installed. OSX Mavericks 10.9.3.


Reply to this email directly or view it on GitHub.

@ghost
Copy link

ghost commented May 22, 2014

Not yet. Which version of node are you using? I'm using the latest v0.11.13. I'll try with an earlier version and will let you know.

@ghost
Copy link

ghost commented May 22, 2014

I don't have a much earlier version of node. I tested with v0.11.12 and it broke when installing pty.js.

@bagusflyer
Copy link
Author

v0.10.26.

Maybe I’ll upgrade the version first.

Thanks.

在 2014年5月22日,下午07:02,arctouch-ecilteodoro notifications@github.com 写道:

Not yet. Which version of node are you using? I'm using the latest v0.11.13. I'll try with an earlier version and will let you know.


Reply to this email directly or view it on GitHub.

@bagusflyer
Copy link
Author

The latest version is v0.10.28 in nodejs official website.

在 2014年5月22日,下午07:07,arctouch-ecilteodoro notifications@github.com 写道:

I don't have a much earlier version of node. I tested with v0.11.12 and it broke when installing pty.js.


Reply to this email directly or view it on GitHub.

@thirstyfish
Copy link

Here's how I could work around this issue:

npm uninstall -g tty.js
git clone https://github.com/chjj/pty.js.git /tmp/pty.js
vim /tmp/pty.js/src/unix/pty.cc

Change line 39 to:

#include "/usr/include/util.h"

Save and exit vim (:qw)

npm install -g /tmp/pty.js
git clone https://github.com/chjj/tty.js /tmp/tty.js
vim /tmp/tty.js/package.json

Remove line for pty dependency ( "pty.js": "0.2.4", ) then save&exit

npm install -g /tmp/tty.js

That's it.

@ghost
Copy link

ghost commented Aug 1, 2014

It worked beautifully! Thanks!

@andyearnshaw
Copy link

@thirstyfish: thanks for the workaround.

@st32lthx
Copy link

that worked for me too, thanks !

@hpenedones
Copy link

Also worked for me in Mac OS 10.9.4. Thanks

@stevenvachon
Copy link

fatal error: '/usr/include/util.h' file not found

@mscdex
Copy link

mscdex commented Oct 5, 2014

@stevenvachon Did you install Xcode and the command line developer tools (you can do this from the terminal via xcode-select --install and it should pop up a window asking you to install)?

@stevenvachon
Copy link

Thanks @mscdex. That solved it.

Will there ever be a binary distribution of pty.js made available for simpler installs and for building node-webkit apps without VMs or clusters.

@jtryan
Copy link

jtryan commented Oct 23, 2014

@thirstyfish
Kudos to you!! Thanks for the answer.
Xocde-6.1 w/ CLI Tools

@ivanoats
Copy link

ivanoats commented Nov 7, 2014

Thanks @thirstyfish ! Your work-around worked on Mac OS 10.10 and node v0.10.33 today.

@hew
Copy link

hew commented Dec 4, 2014

Works on 10.10.1

@ddelapaz
Copy link

Working on io 1.3.0 👍 thanks!

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