R Studio Terminal

Good Evening All, Each time I try to install a quarto extension from the terminal, I keep getting this wired error and I have tried several approach on stackoverflow but still I am unable to resolve it. Please can someone help me with this?

Can you share the command you ran exactly ? What extension are your trying to install ?

It seems you are on Windows right. We may try to unzip with Powershell on windows.

What does this command give you in your terminal ?

where powershell

I believe all windows have a powershell tool available - but we may be wrong.

Thank you for the additional informations

Thank you very much @cderv yes I am on windows, when I try to install the shinylive extension from the terminal I get the following error below:

PS C:\Users\USER\Desktop\Demo-Shiny> quarto add quarto-ext/shinylive

Quarto extensions may execute code when documents are rendered. If you do not
trust the authors of the extension, we recommend that you do not install or
use the extension.
? Do you trust the authors of this extension (Y/n) » Yes
[>] Downloading
'powershell' is not recognized as an internal or external command,
operable program or batch file.
[>] Unzipping
ERROR: Failed to unzip extension.
'powershell' is not recognized as an internal or external command,
operable program or batch file.

Error: Failed to unzip extension.
'powershell' is not recognized as an internal or external command,
operable program or batch file.

at file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:104964:19
at async withSpinner (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:56612:9)
at async unzipAndStage (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:104959:5)
at async installExtension (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:104871:30)
at async Command.fn (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:121771:13)
at async Command.execute (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:8437:13)
at async quarto (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:127539:5)
at async file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:127557:9

where powershell is still pointing me to the project directory

This is kind of an unexpected case here. To install extension on windows we are assuming that powershell is available.

On most windows version there should be a version available, according to Windows PowerShell System Requirements - PowerShell | Microsoft Learn

Which version of windows are you running ? Did you uninstall powershell somehow ?

For now without powershell you can't install an extension on windows. I would need to know more on your specific environment so that we understand how to handle this better.

Thank you for your reply @cderv, I am using windows 10 and I did not uninstall the PowerShell.

It seems to me you don't have powershell.

Can you find powershell when searching on your computer ? Can you start the powershell console in your OS ?

@cderv I can find powershell when I search on my computer!!!

Then this is really odd...

Where is it located ?

If you open CMD terminal (cmd.exe) and type

where powershell

does it give your the right path ?

Quarto is calling

powershell

directly, so it must be found in Windows PATH

Thanks @cderv I guess this is where the issue lies because that command does not give me the right path. Please how can I fix this ?

on windows; you can hit the windows button to bring up the windows menu, if you type env ; You should see options to either/or edit user environment variables, or system environment variables. PATH can be extended from either of these.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

What path does it give you ?

You must have something in your PATH that points to another one it seems...

You can follow above advice or look online how to check and change PATH on windows

Yup as I can read there is mixed information about the presence of PowerShell, I would agree it's not in the path. You can have a look on this vid, which explains how to add OpenJDK to the path. In principle, it would be similar to PowerShell. You have just to find the right file or directory.