Skip to main content
Hey Evgenii
Inspiring
January 12, 2024
Answered

External module doesn't work

  • January 12, 2024
  • 1 reply
  • 371 views

Hello guys I am trying to run 'clipboardy' node module in CEP panel, but it doesn't work
I have a simple setup html, index.js with CEP 10

html tags:

<script type="text/javascript" src="libs/CSInterface.js"></script>
<script type="text/javascript" src="index.js"></script>

manifest params:
<Parameter>--allow-file-access</Parameter>
<Parameter>--allow-file-access-from-files</Parameter>
<Parameter>--enable-nodejs</Parameter>
<Parameter>--mixed-context</Parameter>
<Parameter>--disable-web-security</Parameter>

I was trying to use both require and import but none seems to work
 

 

 

 

 

const clipboardy = require('clipboardy');
//or import clipboardy from "clipboard";
alert(clipboardy.toString());

 

 

 



while const fontlist = require("font-list"); works fine for me 


what can be the problem?

 

This topic has been closed for replies.
Correct answer Manan Joshi

Do you see any errors in the developr console or logs? CEP does have issues loading some nodejs native modules for example I faced issue with a sqlite3 in the past and I resolved that using wasm. See the following discussion it might apply to your use case

https://community.adobe.com/t5/indesign-discussions/c-node-addons-supported-in-cep/m-p/11048562

-Manan

1 reply

Manan JoshiCommunity ExpertCorrect answer
Community Expert
March 18, 2024

Do you see any errors in the developr console or logs? CEP does have issues loading some nodejs native modules for example I faced issue with a sqlite3 in the past and I resolved that using wasm. See the following discussion it might apply to your use case

https://community.adobe.com/t5/indesign-discussions/c-node-addons-supported-in-cep/m-p/11048562

-Manan

-Manan