Using child_process


Beginner here (I come from Python, just trying to write a UXP plugin that interact with our Python pipeline tools).

In my plugin index.js, the line const { exec } = require("child_process"); gives the following error:

Error: Module not found: "child_process". Parent module folder was: "./".

How can I use child_process from my plugin?

Thanks a lot :slight_smile:

That is not allowed. You may be able to do it by passing the process to a helper app.

I see, thanks a lot!

There is no simpler way to execute a shell command from Photoshop? That feels overkill for literally just starting an external script :confused:

I had brought this up as well at the beginning of the year in this thread, which references earlier discussions of the topic: State of arbitrary file access and shell command support. According to some comments in there it sounds like a solution is being worked on. :slight_smile:

1 Like