UDForge - Build desktop apps with UD

So not sure why just yet but i’m getting a Javascript error when launching the Electron exe. I tried to spawn a child process called pwsh in Node and didn’t see any errors. Only Core I have installed is pwsh 7 preview 4

A JavaScript error occurred in the main process
Uncaught Exception:
Error: spawn pwsh ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:84:9)

What does your dashboard.ps1 look like? Do you have the -Wait parameter on Start-UDDashboard?

I actually just copied your Burnt Toast example verbatim

Weird. It appears it’s failing to start pwsh but you said you can launch it fine. I was looking at this and it seems like we might be able to call exec to get more info: https://stackoverflow.com/questions/27688804/how-do-i-debug-error-spawn-enoent-on-node-js

Seems to be a problem with Powershell 7. If I call
use child = child_process.spawn(“powershell”, ["-file", “C:\dashboard.ps1”]);

It runs the Dashboard, wich is weird because I can call pwsh from command line

Hey @adam, Electron always gets beat up for garglin sticks of RAM for breakfast (its like people need something new to throw hate at now that Java is slowly disappearing) - What kind of resource does the sample BurntToast app consume when running?

Another question,

Since Powershell Core is a requirement, will any UDforge app be limited to the modules available to Powershell core?

It was using about 150 mb ram for that example. You can use Windows PowerShell with it. You just need to specify the -PowerShellHost parameter and set it to PowerShell rather than pwsh.

2 Likes

One thing I don’t like about it is the storage footprint. Electron is about 50 MB and UD is about 50 MB. I think we’ll add another 60 MBish if you include PWSH. I bet I can get UD half that size by finally targeting netstandard properly. But it’s still a pretty big payload.

I dont feel like it’s that bad, not for a desktop app. But there might be other reasons to reduce (efficiency/ build time etc).

200MB shouldn’t brake anyone’s storage budget :stuck_out_tongue:

I’m VERY interested in UDForge. I currently tinker with PowerShell Studio, and I do mean tinker, I’m a noob to PS but was more interested in GUI tool, but that can run PS commands. I love the Electron Apps I have viewed before. My “Dream” of what UDForge could be is a multi-use .ps1 file app,because I would like to see the ability of just pushing/updating changed .ps1 files,but Electron app might not be able to do that as I thought it was like a single image file. Not sure.

@PorreKaj > I agree, apps nowadays eat up large space. I do not think most end-user people know or care. Agreed, 200MB is fine. Heck, take 300-400 if you must, just run good and don’t lock up my pc. :slight_smile:

I am having similar difficulty that is mentioned about possible dependency issue. Although, I am not sure what is going on. The Electron app launches, and then looks like it is trying to do something, but never launches an app. On my PC I installedUDForge, UD it runs fine. Did I miss something, or doing something wrong? BTW, I am using Windows Sandbox in Win10 64 Bit so that may be the issues if it needs other components it is unable to locate.