Skip to content

Default ASP.NET 7 React SPA template can't start SPA server without PowerShell #46726

Open
@leandrobueno

Description

@leandrobueno

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I've created a sample template using dotnet new react and when trying to run it using dotnet run I get an error saying:

fail: Microsoft.AspNetCore.SpaProxyLaunchManager[0]
      Failed to launch the SPA development server 'npm start'.
      System.ComponentMomdel.Win32Exception (1260): An error occurred trying to start process 'powershell.exe' with working directory 'c:/foo/bar/'. This program is blocked by a group policy.

Indeed, PowerShell is blocked on my work machine, and I can only use cmd.exe.

Expected Behavior

Be able to choose between cmd.exe, PowerShell or another CLI when using SPA Development Server.

Steps To Reproduce

Create a template with dotnet new react.
Have PowerShell blocked by a group policy in the machine.
Try to run the application.

Exceptions (if any)

No response

.NET Version

7.0.102

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-ui-renderingIncludes: MVC Views/Pages, Razor Views/PagesenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-spa

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions