jucasoliveira/terminalGPT

can't install on Windows for git bash or powershell

Closed this issue · 5 comments

fails to install with this output:

npm ERR! code 1
npm ERR! path C:\Users\my_username\AppData\Roaming\npm\node_modules\terminalgpt
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c tsc
npm ERR! 'tsc' is not recognized as an internal or external command,
npm ERR! operable program or batch file.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\my_username\AppData\Local\npm-cache_logs\2023-09-23T20_45_34_003Z-debug-0.log

To Reproduce
inside git bash or cmd or powershell, run this command:
npm -g install terminalgpt

Desktop (please complete the following information):
Windows 10
Using git bash or powershell

Hi @calebgibney , can you give the logs of the error ? It would help a lot , as I don't have a Windows machine.

2023-10-01T15_44_41_224Z-debug-0.log

@lucasgooliveira thank you very much for willingness to investigate!

The above is because typescript is not installed yet, so it could not call tsc to compile.
Maybe adding typescript to the dependency helps?

Describe the bug
Compile error -- pasted below

To Reproduce

  • have nodejs installed
    npm install -g terminalgpt

Expected behavior
npm installed without issues

Desktop (please complete the following information):

  • OS: Windows 10
  • Terminnal : cwd

Additional context
Add any other context about the problem here.

npm ERR! code 2
npm ERR! path C:\Users\squirrelroad\.conda\envs\ter\node_modules\terminalgpt
npm ERR! command failed
npm ERR! command C:\windows\system32\cmd.exe /d /s /c tsc
npm ERR! src/utils.ts(17,5): error TS2322: Type 'TerminalRenderer' is not assignable to type 'Renderer<never>'.
npm ERR!   The types of 'options.renderer' are incompatible between these types.
npm ERR!     Type 'Omit<_Renderer, "constructor"> | null | undefined' is not assignable to type 'Renderer<never> | undefined'.
npm ERR!       Type 'null' is not assignable to type 'Renderer<never> | undefined'.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\squirrelroad\AppData\Local\npm-cache\_logs\2023-10-05T09_13_08_580Z-debug-0.log

I think types/marked-terminal is not compatible with Windows? if there's alternative to test by temporarily removing this package?

Kind regards,

I hope this helps so after installing typescript the main install command yields new error:
2023-10-05T18_21_46_573Z-debug-0.log

image

I've re-tested and found the error, I've update the library to version 1.7.3 and hopefully you'll be able to install it again.
#82