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

Failed to install pty.js #65

Open
pgrm opened this issue Mar 21, 2014 · 14 comments
Open

Failed to install pty.js #65

pgrm opened this issue Mar 21, 2014 · 14 comments

Comments

@pgrm
Copy link

pgrm commented Mar 21, 2014

I'm trying to install a node-js package which is dependent on pty.js. When installing it I get plenty of errors and a nice message suggesting me that the problem is in pty.js; So this is the output (excluded all download-notifications) when I run npm install -g pty.js --msvs_version=2013

  DebugClient.cc
  Agent.cc
  EventLoop.cc
  Coord.cc
  AgentAssert.cc
  Win32Console.cc
..\..\..\deps\winpty\agent\EventLoop.cc(69): error C2039: 'max' : is not a memb
er of 'std' [C:\Users\TestUser\AppData\Roaming\npm\node_modules\pty.js\build\deps
\winpty\winpty-agent.vcxproj]
..\..\..\deps\winpty\agent\EventLoop.cc(69): error C3861: 'max': identifier not
 found [C:\Users\TestUser\AppData\Roaming\npm\node_modules\pty.js\build\deps\winp
ty\winpty-agent.vcxproj]
  Terminal.cc
  main.cc
  ConsoleInput.cc
  NamedPipe.cc
  SmallRect.cc
..\..\..\deps\winpty\agent\NamedPipe.cc(153): error C2039: 'min' : is not a mem
ber of 'std' [C:\Users\TestUser\AppData\Roaming\npm\node_modules\pty.js\build\dep
s\winpty\winpty-agent.vcxproj]
..\..\..\deps\winpty\agent\NamedPipe.cc(153): error C3861: 'min': identifier no
t found [C:\Users\TestUser\AppData\Roaming\npm\node_modules\pty.js\build\deps\win
pty\winpty-agent.vcxproj]
..\..\..\deps\winpty\agent\NamedPipe.cc(222): error C2039: 'min' : is not a mem
ber of 'std' [C:\Users\TestUser\AppData\Roaming\npm\node_modules\pty.js\build\dep
s\winpty\winpty-agent.vcxproj]
..\..\..\deps\winpty\agent\NamedPipe.cc(222): error C3861: 'min': identifier no
t found [C:\Users\TestUser\AppData\Roaming\npm\node_modules\pty.js\build\deps\win
pty\winpty-agent.vcxproj]
..\..\..\deps\winpty\agent\NamedPipe.cc(229): error C2039: 'min' : is not a mem
ber of 'std' [C:\Users\TestUser\AppData\Roaming\npm\node_modules\pty.js\build\dep
s\winpty\winpty-agent.vcxproj]
..\..\..\deps\winpty\agent\NamedPipe.cc(229): error C3861: 'min': identifier no
t found [C:\Users\TestUser\AppData\Roaming\npm\node_modules\pty.js\build\deps\win
pty\winpty-agent.vcxproj]
  DebugClient.cc
  winpty.cc
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc (..\..\..\deps\winpty\libwinpty\winpty.cc) [C:\Users\TestUser\AppDa
ta\Roaming\npm\node_modules\pty.js\build\deps\winpty\winpty.vcxproj]
     Creating library C:\Users\TestUser\AppData\Roaming\npm\node_modules\pty.js\b
  uild\Release\winpty.lib and object C:\Users\TestUser\AppData\Roaming\npm\node_m
  odules\pty.js\build\Release\winpty.exp
  Generating code
  Finished generating code
  winpty.vcxproj -> C:\Users\TestUser\AppData\Roaming\npm\node_modules\pty.js\bui
  ld\Release\\winpty.dll
@asnowfix
Copy link

asnowfix commented Jul 2, 2014

Same problem here, while trying to use https://github.com/artoale/brackets-terminal

  • Windows 8.1
  • Visual Studio 2013 Ultimate
  • npm install -g tty.js run from Cygwin (Git Bash)

@asnowfix
Copy link

asnowfix commented Jul 2, 2014

The important error messages (missing STL symbol) should enable fixing the problem (use #define MIN(a,b) and #define MAX(a,b)) are):

..\..\..\deps\winpty\agent\EventLoop.cc(69): error C2039: 'max' : is not a member of 'std' [C:\Users\kowalskif\AppData\Roaming\npm\
node_modules\tty.js\node_modules\pty.js\build\deps\winpty\winpty-agent.vcxproj]

and:

..\..\..\deps\winpty\agent\NamedPipe.cc(153): error C2039: 'min' : is not a member of 'std' [C:\Users\kowalskif\AppData\Roaming\npm
\node_modules\tty.js\node_modules\pty.js\build\deps\winpty\winpty-agent.vcxproj]

@asnowfix
Copy link

asnowfix commented Jul 2, 2014

BTW, adding #include <algorithm> should define those missing symbols....

@thatkookooguy
Copy link

including it where?

I'm using npm install -g tty.js so I don't have a script to add #include to.

any details?

@DroidUnknown
Copy link

@thatkookooguy did you find any solution? I am stuck at the same spot.

@thatkookooguy
Copy link

@userunknow (talking about tty.js which uses pty.js) Eventually, I installed tty.js as non-global in my home directory (Linux) with sudo npm install tty.js, and created an alias in my .bashrc file:
alias ttyjs='node ~/node_modules/tty.js/bin/tty.js'.

@DroidUnknown
Copy link

@thatkookooguy what if it is windows, how can we do that in windows?

@thatkookooguy
Copy link

@DroidUnknown You can add the local tty.js to the windows PATH variable (Just like node and npm are added automatically).

Here's how:

  1. Right click on my computer (either on desktop or start menu). Select Advanced system settings on the sidebar
  2. On the new pop-up window, click on the Advanced tab, and then, on Environment Variables...
  3. Under System variables, look for the path variable.
  4. Edit it. at the very end, add another ; (that's the seperator), and add the absolute path to <tty.js installed folder>\bin

didn't try it yet. but I'm pretty sure that will let you use it like node tty.js

let me know if there are any problems

@DroidUnknown
Copy link

@thatkookooguy issue is i am unable to properly install tty.js. I am stuck at

D:\Office Work Space\Node>npm install -g pty.js --msvs_version=2013
/

pty.js@0.3.0 install C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js
node-gyp rebuild

C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js>if not defined npm_conf
g_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin..
..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
Agent.cc
AgentAssert.cc
ConsoleInput.cc
Coord.cc
EventLoop.cc
......\deps\winpty\agent\EventLoop.cc(69): error C2039: 'max' : is not a memb
er of 'std' [C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js\build\deps
\winpty\winpty-agent.vcxproj]
......\deps\winpty\agent\EventLoop.cc(69): error C3861: 'max': identifier not
found [C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js\build\deps\winp
ty\winpty-agent.vcxproj]
NamedPipe.cc
SmallRect.cc
Terminal.cc
Win32Console.cc
......\deps\winpty\agent\NamedPipe.cc(153): error C2039: 'min' : is not a mem
ber of 'std' [C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js\build\dep
s\winpty\winpty-agent.vcxproj]
......\deps\winpty\agent\NamedPipe.cc(153): error C3861: 'min': identifier no
t found [C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js\build\deps\win
pty\winpty-agent.vcxproj]
......\deps\winpty\agent\NamedPipe.cc(222): error C2039: 'min' : is not a mem
ber of 'std' [C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js\build\dep
s\winpty\winpty-agent.vcxproj]
......\deps\winpty\agent\NamedPipe.cc(222): error C3861: 'min': identifier no
t found [C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js\build\deps\win
pty\winpty-agent.vcxproj]
......\deps\winpty\agent\NamedPipe.cc(229): error C2039: 'min' : is not a mem
ber of 'std' [C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js\build\dep
s\winpty\winpty-agent.vcxproj]
......\deps\winpty\agent\NamedPipe.cc(229): error C3861: 'min': identifier no
t found [C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js\build\deps\win
pty\winpty-agent.vcxproj]
main.cc
DebugClient.cc
winpty.cc
DebugClient.cc
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc (......\deps\winpty\libwinpty\winpty.cc) [C:\Users\Muneeb\AppDa
ta\Roaming\npm\node_modules\pty.js\build\deps\winpty\winpty.vcxproj]
Creating library C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js\b
uild\Release\winpty.lib and object C:\Users\Muneeb\AppData\Roaming\npm\node_m
odules\pty.js\build\Release\winpty.exp
Generating code
Finished generating code
winpty.vcxproj -> C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js\bui
ld\Release\winpty.dll
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fai
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:107
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_mod
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Muneeb\AppData\Roaming\npm\node_modules\pty.js
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej
\node_modules\npm\bin\npm-cli.js" "install" "-g" "pty.js" "--msvs_version=2
13"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! pty.js@0.3.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js@0.3.0 install script 'node-gyp rebuild'.
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! D:\Office Work Space\Node\npm-debug.log

@BenasPaulikas
Copy link

UP. Any fixes on this ?

@DroidUnknown
Copy link

No I am afraid not yet.

@BenasPaulikas
Copy link

When we can except to find the solution ? It's seems it should be just a very simple bug ?

@thatkookooguy
Copy link

Might be something to do with versions?

All of you are experiencing this on Windows? Or this is cross platform?

What's the version number of your node and npm?
(you can check by running npm -v & node -v)

please right that here (and which OS you're running)

I'm not sure how much I can help but I'll try

@BenasPaulikas
Copy link

In Linux it's compiling perfectly, but I think it's using different libraries for windows(which are not compiling because of some std error)

I'm using windows 7

npm -v: 2.11.3
node -v: v0.12.7

Thanks

ddm pushed a commit to ddm/pty.js that referenced this issue Nov 8, 2017
Add basic tests for encoding option with PtyFork.
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

5 participants