Errors installing pty.js (node) on OS X

孤者浪人 提交于 2019-12-02 19:41:15

I had the same issue with a different node package devtools-terminal.

The problem is that a header file is configured incorrectly for OSX as explained here.

This is the work around I use:

  1. mkdir /tmp/pty.js
  2. git clone https://github.com/chjj/pty.js.git /tmp/pty.js
  3. vi /tmp/pty.js/src/unix/pty.cc
  4. replace line 39: #include <util.h> with #include "/usr/include/util.h"
  5. npm install -g /tmp/pty.js
  6. and now npm install -g devtools-terminal should work.

This way you fix the issue in pty.js and use your local copy as the dependency for the package you with to install.

Good luck!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!