pty.js icon indicating copy to clipboard operation
pty.js copied to clipboard

`npm install pty.js` failed on Windows 10

Open dizel3d opened this issue 8 years ago • 10 comments

image

dizel3d avatar Mar 21 '16 16:03 dizel3d

+1

roccomuso avatar Mar 25 '16 17:03 roccomuso

I had Visual Studio with Visual C# only. Then I installed Visual C++ too. And now I have new problems. image

dizel3d avatar Mar 25 '16 18:03 dizel3d

+1

alexandruradovici avatar Apr 18 '16 07:04 alexandruradovici

+1

darlingtonamz avatar Apr 18 '16 08:04 darlingtonamz

I tried https://github.com/iiegor/ptyw.js. It works in Windows 10, still fails in Windows 10 IoT Core.

alexandruradovici avatar Apr 18 '16 08:04 alexandruradovici

Not sure if this is the same problem or a different one, but I get the following npm-debug.log on Window 10 with Node 6.

101914 info lifecycle [email protected]~install: [email protected]
101915 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle true
101916 verbose lifecycle [email protected]~install: PATH: C:\Users\download\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\download\Desktop\black-screen\node_modules\pty.js\node_modules\.bin;C:\Users\download\Desktop\black-screen\node_modules\.bin;C:\Program Files\nodejs;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Mercurial\;C:\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Rust stable GNU 1.7\bin;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\nodejs\;C:\Go\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\download\AppData\Roaming\local\bin;C:\Program Files\nodejs;C:\HashiCorp\Vagrant\bin;C:\Program Files\erl7.0\bin;C:\ProgramData\ComposerSetup\bin;C:\Users\download\AppData\Local\Code\bin;C:\Users\download\AppData\Local\atom\bin;C:\Users\download\bin;C:\Users\download\AppData\Local\Programs\Git\bin;C:\Users\download\AppData\Roaming\npm;C:\Users\download\gostuff\bin;C:\Users\download\AppData\Local\Microsoft\WindowsApps;C:\Users\download\bin\terraform;C:\Users\download\manually_installed\ImageMagick-6.8.5\bin
101917 verbose lifecycle [email protected]~install: CWD: C:\Users\download\Desktop\black-screen\node_modules\pty.js
101918 silly lifecycle [email protected]~install: Args: [ '/d /s /c', 'node-gyp rebuild' ]
101919 silly lifecycle [email protected]~install: Returned: code: 1  signal: null
101920 info lifecycle [email protected]~install: Failed to exec install script
101921 verbose unlock done using C:\Users\download\AppData\Roaming\npm-cache\_locks\staging-392b911a2f204a0c.lock for C:\Users\download\Desktop\black-screen\node_modules\.staging
101922 silly rollbackFailedOptional Starting
101923 silly rollbackFailedOptional Finishing
101924 silly runTopLevelLifecycles Starting
101925 silly runTopLevelLifecycles Finishing
101926 silly install printInstalled
101927 warn optional Skipping failed optional dependency /electron-builder/appdmg:
101928 warn notsup Not compatible with your operating system or architecture: [email protected]
101929 warn optional Skipping failed optional dependency /7zip-bin/7zip-bin-linux:
101930 warn notsup Not compatible with your operating system or architecture: [email protected]
101931 warn optional Skipping failed optional dependency /7zip-bin/7zip-bin-osx:
101932 warn notsup Not compatible with your operating system or architecture: [email protected]
101933 verbose stack Error: [email protected] install: `node-gyp rebuild`
101933 verbose stack Exit status 1
101933 verbose stack     at EventEmitter.<anonymous> (C:\Users\download\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:245:16)
101933 verbose stack     at emitTwo (events.js:106:13)
101933 verbose stack     at EventEmitter.emit (events.js:191:7)
101933 verbose stack     at ChildProcess.<anonymous> (C:\Users\download\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
101933 verbose stack     at emitTwo (events.js:106:13)
101933 verbose stack     at ChildProcess.emit (events.js:191:7)
101933 verbose stack     at maybeClose (internal/child_process.js:850:16)
101933 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
101934 verbose pkgid [email protected]
101935 verbose cwd C:\Users\download\Desktop\black-screen
101936 error Windows_NT 10.0.14372
101937 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\download\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
101938 error node v6.1.0
101939 error npm  v3.9.0
101940 error code ELIFECYCLE
101941 error [email protected] install: `node-gyp rebuild`
101941 error Exit status 1
101942 error Failed at the [email protected] install script 'node-gyp rebuild'.
101942 error Make sure you have the latest version of node.js and npm installed.
101942 error If you do, this is most likely a problem with the pty.js package,
101942 error not with npm itself.
101942 error Tell the author that this fails on your system:
101942 error     node-gyp rebuild
101942 error You can get information on how to open an issue for this project with:
101942 error     npm bugs pty.js
101942 error Or if that isn't available, you can get their info via:
101942 error     npm owner ls pty.js
101942 error There is likely additional logging output above.
101943 verbose exit [ 1, true ]

download13 avatar Jul 13 '16 18:07 download13

Have the same error when installing demo for xterm.js that use pty.js on Windows 7.

Does pty.js support windows?

jcubic avatar Sep 07 '16 08:09 jcubic

+1, tried demo fpr xterm.js and tty,js, both failed on windows 10.

Kopleman avatar Sep 12 '16 07:09 Kopleman

Hi friend, I have performed the following steps to work

Install the dependencies

  • Python v2.7.3+ (https://www.python.org/ftp/python/2.7.3/python-2.7.3.msi)
  • Windows SDK v7.1+ (http://www.microsoft.com/en-us/download/details.aspx?id=8279)
  • Windows SDK v10 (https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk)
  • Visual Studio 2015 (http://www.microsoft.com/en-us/download/details.aspx?id=23691)

Enter the following commands in the CMD

npm install -g node-gyp
npm --vcc-build-tools-parameters='[""/Full""]' install --global windows-build-tools
set PYTHONPATH=/path/to/python2.7
set PYTHON=%PYTHONPATH%/python.exe
node-gyp --python /path/to/python2.7
npm config set python /path/to/executable/python2.7
npm config set msvs_version 2015

Include path

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt

andrehrf avatar Jan 26 '17 01:01 andrehrf

@andrehrf solution worked for me. Some changes though:

  • On Windows 10, installing Windows SDK v10 is enough. In fact, Win SDK v7 failed to install.

  • node-gyp --python /path/to/python2.7 doesn't work. Not a valid command. But I was able to get past node-pty install without this.

mrchief avatar Jan 05 '18 01:01 mrchief