Adobe-CEP / CEP-Resources

Tools and documentation for building Creative Cloud app extensions with CEP
https://www.adobe.io/apis/creativecloud/cep.html
1.63k stars 834 forks source link

child_process.fork() not working #178

Open embiem opened 6 years ago

embiem commented 6 years ago

When trying to fork a js module, the "spawnfile" used in the resulting ChildProcess is pointing to C:\Program Files\Adobe\Adobe After Effects CC 2018\Support Files\CEPHtmlEngine\CEPHtmlEngine.exe, which doesn't execute the forked js module.

Is there some way to use the fork() function in the CEP?

majg0 commented 5 years ago

I circumvented this by doing vaguely this;

require('child_process').spawn(
  isWindows
    ? 'C:\\Program Files (x86)\\Adobe\\Adobe Creative Cloud Experience\\libs\\nodejs.exe'
    : '/Library/Application Support/Adobe/Creative Cloud Libraries/CCLibrary.app/Contents/libs/node',
  ['./worker.js'],
  { cwd: 'SOME_PATH' }
)