While starting a simple react app on azure container instance running on windows we are getting an PowerShell error. The error details are as below. Can someone please guide if additional settings are required?

Aritra Roy 0 Reputation points
2023-03-12T13:33:12.6866667+00:00

The app runs in docker in local environment without any problem. But on deploying to ACI it fails on startup with the below error

> react-complete-guide@0.1.0 start > react-scripts --openssl-legacy-provider start  



ℹ 「wds」: Project is running at http://192.168.0.13/ 

ℹ 「wds」: webpack output is served from 

 ℹ 「wds」: Content not from webpack is served from /react-assignment1/public 

ℹ 「wds」: 404s will fallback to / Starting the development server...  

node:events:491       

           throw er; // Unhandled 'error' event       

           ^ 

Error: spawn /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe ENOENT     

at ChildProcess._handle.onexit (node:internal/child_process:283:19)     

at onErrorNT (node:internal/child_process:476:16)     

at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 

Emitted 'error' event on ChildProcess instance at:     at ChildProcess._handle.onexit (node:internal/child_process:289:12)     at onErrorNT (node:internal/child_process:476:16)     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {   errno: -2,   code: 'ENOENT',   syscall: 'spawn /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe',   path: '/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe',   spawnargs: [     '-NoProfile',     '-NonInteractive',     '–ExecutionPolicy',     'Bypass',     '-EncodedCommand',     'UwB0AGEAcgB0ACAAIgBoAHQAdABwADoALwAvAGwAbwBjAGEAbABoAG8AcwB0ADoAMwAwADAAMAAiAA=='   ] }
Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
757 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JimmySalian-2011 42,491 Reputation points
    2023-03-12T19:36:28.9633333+00:00

    Arita not sure which process you have followed for setting up the environment, can you provide additional information and also check this page for detialed deployment guide and process of running a app in ACI in Azure - https://medium.com/bb-tutorials-and-thoughts/how-to-run-a-react-app-as-a-container-on-azure-vm-b73094fdc28a

    Hope this helps.

    JS

    ==

    Please accept as answer and do a Thumbs-up to upvote this response if you are satisfied with the community help. Your upvote will be beneficial for the community users facing similar issues.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.