johnlindquist / kit

Script Kit. Automate Anything.
https://scriptkit.com
MIT License
3.91k stars 138 forks source link

[Windows 11 x64 bit] File not found error while opening the kit cli by pressing the '>' button #1218

Closed D3FAU4T closed 1 year ago

D3FAU4T commented 1 year ago

I get the following error when trying to open the kit cli pressing the '>' button:

Kit 1.54.52Electron 24.1.2win32 10.0.25330Locale: en-US

Error: File not found: at new WindowsPtyAgent (C:\Users\D3FAU4T\AppData\Local\Programs\kit\resources\app.asar\node_modules\node-pty\src\windowsPtyAgent.ts:105:49) at new WindowsTerminal (C:\Users\D3FAU4T\AppData\Local\Programs\kit\resources\app.asar\node_modules\node-pty\src\windowsTerminal.ts:51:19) at Object.spawn (C:\Users\D3FAU4T\AppData\Local\Programs\kit\resources\app.asar\node_modules\node-pty\src\index.ts:30:10) at C:\Users\D3FAU4T\AppData\Local\Programs\kit\resources\app.asar\main.prod.js:2:478486 at l (C:\Users\D3FAU4T\AppData\Local\Programs\kit\resources\app.asar\main.prod.js:2:468639) at Generator. (C:\Users\D3FAU4T\AppData\Local\Programs\kit\resources\app.asar\main.prod.js:2:469977) at Generator.next (C:\Users\D3FAU4T\AppData\Local\Programs\kit\resources\app.asar\main.prod.js:2:469002) at Ph (C:\Users\D3FAU4T\AppData\Local\Programs\kit\resources\app.asar\main.prod.js:2:474631) at a (C:\Users\D3FAU4T\AppData\Local\Programs\kit\resources\app.asar\main.prod.js:2:474835)

System:

I'm using Windows 11 x64 bit

Visual Representation:

image

D3FAU4T commented 1 year ago

Weird but re-installing the software fixed the issue for me. Not sure why it appeared on first install but I'm gonna close this issue since it's solved.

johnlindquist commented 1 year ago

@D3FAU4T Strange, thanks for the heads-up. I'm not sure what might have happened either, but I'll keep an eye out for it in the future.

D3FAU4T commented 1 year ago

Hey @johnlindquist , all of a sudden, today I'm getting this same issue while trying to open the CLI again today. It's really weird and hence I'm re-opening this issue again. Can I do anything to provide you with logs or something?

D3FAU4T commented 1 year ago

Exiting the program from the System tray and restarting the program fixed the issue again, however, this time I'm going to keep this Github issue open. I think this issue may occur again in the near future.

Thank you for making such an awesome tool. I wish you success in improving this tool 👍

D3FAU4T commented 1 year ago

Issue identified

The ultimate problem was that the program couldn't find any path for the shell thus showing the error and on exiting and restarting the program defaults to the Command Prompt.

Fix provided by the developer

So, the fix provided by @johnlindquist (developer) in discord is to add KIT_SHELL=Path/to/your/shell in the .env file located in path ~/.kenv/.env.

For example, if you're a Windows 10 or above user, you can add one of these line in the .env file:

The problem should go away after that.

I close this issue with this comment so if anyone goes through this same issue can find this and resolve quickly on spot