- How can I run a command from an app running in Chromium on Linux (or potentially Windows or Android in the future)?
- Why do you want to do this? To control, for example, some audio/TV equipment using cec-client.
echo "tx 20:36" | cec-client RPI -s -d 4
- However, the question about the concept of shelling and spawning commands is generic.
I have created the SystemCall class with various attempts based on different sources I found, but I am encountering an error saying "Cannot find module "child_process"
- I am aware that running system calls from JS/TS is not recommended, but this app will operate in a controlled environment.
- Ideally, I would like to avoid using a local server or PHP, as I need to make calls directly to the local hardware rather than a remote server.
- Additionally, I am facing issues with transitioning from Ionic3 to Ionic5 due to numerous breaking changes.
// Your modified code here
I am currently injecting the SystemCall class into app.component.ts and calling SystemCall.Run() for testing purposes.
I find it strange that VSCode displays the signatures of exec when hovering over the import line?? https://i.sstatic.net/rYPj6.png
I have tried running the command
npm install child_process --save
and my package now shows https://i.sstatic.net/edKta.png
Thank you for your assistance; at the moment, I feel like I'm navigating through murky waters.