bus-stop / Termination

Integrated terminal for Atom. Looks like terminal-plus, acts like your native terminal (except every other Friday). Looking for collaborators! :-)
https://atom.io/packages/termination
MIT License
86 stars 7 forks source link

Can't launch terminal on Windows 10 #99

Closed aviatesk closed 5 years ago

aviatesk commented 5 years ago

First off, thanks for making this useful package !

After updating to v0.7.3, even though I could update the package successfully, but when try to actually launch a terminal, it doesn't work and the console shows the error below:

<embedded>:14 Cannot find module '..\build\Debug\conpty.node' Error: Cannot find module '..\build\Debug\conpty.node'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
    at Function.Module._load (internal/modules/cjs/loader.js:528:25)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.loadNative (C:\Users\aviat\.atom\packages\termination\node_modules\node-pty-prebuilt-multiarch\lib\utils.js:22:16)
    at new WindowsPtyAgent (C:\Users\aviat\.atom\packages\termination\node_modules\node-pty-prebuilt-multiarch\lib\windowsPtyAgent.js:34:40)
    at new WindowsTerminal (C:\Users\aviat\.atom\packages\termination\node_modules\node-pty-prebuilt-multiarch\lib\windowsTerminal.js:49:24)
    at Object.fork (C:\Users\aviat\.atom\packages\termination\node_modules\node-pty-prebuilt-multiarch\lib\index.js:34:12)
    at Object.module.exports (file:///C:/Users/aviat/.atom/packages/termination/lib/process.coffee:25:22)
    at process.<anonymous> (C:\Users\aviat\AppData\Local\atom\app-1.39.1\resources\app.asar\src\task-bootstrap.js:69:43)
    at process.emit (events.js:182:13)
    at emit (internal/child_process.js:811:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(anonymous) @ <embedded>:14
(anonymous) @ <embedded>:14
simpleDispatch @ <embedded>:11
emit @ <embedded>:11
(anonymous) @ <embedded>:14
emit @ events.js:182
emit @ internal/child_process.js:811
_tickCallback @ internal/process/next_tick.js:63

Thanks for your help in advance !

Aerijo commented 5 years ago

https://github.com/oznu/node-pty-prebuilt-multiarch/issues/1

aviatesk commented 5 years ago

Thanks. Manually changing to "node-pty-prebuilt-multiarch": "0.9.0-beta21.1" and rebuilding the package just worked.

philip-hodder-ln commented 5 years ago

I have the same issue on Windows 10, but not on my Mac. Tried to go back to 0.7.1 using apm install termination@0.7.1 but get a whole screenfull of error messages:

$ apm install termination@0.7.1
Installing termination@0.7.1 to C:\Users\hodderpx\.atom\packages failed 

> node-pty-prebuilt@0.7.6 install C:\Users\hodderpx\AppData\Local\Temp\apm-install-dir-11977-32784-cjtjur.4m1t4\node_modules\termination\node_modules\node-pty-prebuilt
> prebuild-install || node scripts/install.js

C:\Users\hodderpx\AppData\Local\Temp\apm-install-dir-11977-32784-cjtjur.4m1t4\node_modules\termination\node_modules\node-pty-prebuilt>if not defined npm_config_node_gyp (node "C:\Users\hodderpx\AppData\Local\atom\app-1.39.1\resources\app\apm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --build_v8_with_gn=false )  else (node "C:\Users\hodderpx\AppData\Local\atom\app-1.39.1\resources\app\apm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --build_v8_with_gn=false )

prebuild-install WARN install No prebuilt binaries found (target=3.1.10 runtime=electron arch=x64 libc= platform=win32)
'cmd' is not recognized as an internal or external command,
operable program or batch file.
gyp: Call to 'cmd /c "cd shared && GetCommitHash.bat"' returned exit status 1 while in deps\winpty\src\winpty.gyp. while loading dependencies of binding.gyp while trying to load binding.gyp   
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\hodderpx\AppData\Local\atom\app-1.39.1\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Users\\hodderpx\\AppData\\Local\\atom\\app-1.39.1\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\hodderpx\\AppData\\Local\\atom\\app-1.39.1\\resources\\app\\apm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--build_v8_with_gn=false"
gyp ERR! cwd C:\Users\hodderpx\AppData\Local\Temp\apm-install-dir-11977-32784-cjtjur.4m1t4\node_modules\termination\node_modules\node-pty-prebuilt
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\hodderpx\AppData\Local\Temp\apm-install-dir-11977-32784-cjtjur.4m1t4\package.json'
npm WARN apm-install-dir-11977-32784-cjtjur.4m1t4 No description
npm WARN apm-install-dir-11977-32784-cjtjur.4m1t4 No repository field.
npm WARN apm-install-dir-11977-32784-cjtjur.4m1t4 No README data
npm WARN apm-install-dir-11977-32784-cjtjur.4m1t4 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty-prebuilt@0.7.6 install: `prebuild-install || node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty-prebuilt@0.7.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hodderpx\.atom\.apm\_logs\2019-08-07T08_33_21_461Z-debug.log
Zoddo commented 5 years ago

Hi,

I have the exact same issue.

@aviatesk Can I know how you rebuild the module? I'm not familiar with apm…

Fred-Barclay commented 5 years ago

Hi folks, I'm sorry, this is a sticky issue. I'm hesitant to move to node-py-prebuilt-multiarch 0.9 since it's still in beta but it seems that may be the best choice.

I'm keeping an eye on our upstream, in particular https://github.com/platformio/platformio-atom-ide-terminal/pull/764. I'll push out a new release as soon as it's merged (or sooner if it takes too long).

@philip-hodder-ln I would suspect you would have to downgrade Atom too :frowning:

Some upstream discussions: https://github.com/platformio/platformio-atom-ide-terminal/issues/760 https://github.com/platformio/platformio-atom-ide-terminal/pull/764 https://github.com/oznu/node-pty-prebuilt-multiarch/issues/1 https://github.com/oznu/node-pty-prebuilt-multiarch/pull/4

Possible workaround for now... Again, I apologise that this is necessary. I also don't have access to a Windows 10 machine running Atom so this is a bit of guesswork on my part.

  1. Open the file %USERPROFILE%\.atom\packages\termination\package.json and change the line "node-pty-prebuilt-multiarch": "^0.8.1", to "node-pty-prebuilt-multiarch": "0.9.0-beta21.legacy",

  2. Open a command prompt window in %USERPROFILE%\.atom\packages\termination\ and run the command apm rebuild.

  3. Restart Atom.

Hopefully this works. I'll have a fix in ASAP.

Cheers! Fred

Fred-Barclay commented 5 years ago

Hi everyone, can you try...

apm uninstall termination
apm install Fred-Barclay/Termination

Hopefully the issue is fixed and I can make a proper release soon but would really appreciate feedback if this worked.

Thanks! Fred

aviatesk commented 5 years ago

@Fred-Barclay Yep, it works nicely :) Thanks for the patch and looking forward to the release !

Fred-Barclay commented 5 years ago

Thanks, bugfix should be released now! :smile:

philip-hodder-ln commented 5 years ago

Works for me on both Mac and Windows 10, Thanks!