Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to start node js server in CEP

Participant ,
Nov 25, 2024 Nov 25, 2024

Hi, I am trying to use exiftool-vendored to read some EXIF metadata of media, I have node js script file that works perfectly, but as soon as I import it into the CEP panel context via 'require' it gives me 'Uncaught Error: Cannot find module 'node:events''. Events is native node module and it seems it is not available in cep context.

So I was trying to setup a simple server adding the tag to index.html:

<script>
var localServer = cep_node.require(__dirname + "/server/main.js")();
</script>

the server works perfectly and I am able to recieve callbacks, however as soon as I use require to get exiftool-vendored module into the server script file it breaks again

is there a way to run standalone server file, simillar to 'node server.js' that will be laucnhed from cep panel, but will have node js context?
TOPICS
How to , SDK
225
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Nov 26, 2024 Nov 26, 2024
Translate
Adobe Employee ,
Nov 26, 2024 Nov 26, 2024
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines