Having difficulties running the Premiere Pro UXP plugin Sample Project

Hello! I’ve installed the Premiere Pro sample project found here.

I’ve followed the directions, installed dependencies, and loaded the UXP panel, but none of the buttons work. When looking at the debug console within Adobe UXP Developer Tools, I see the following error.


uxp://uxp-internal/domjs_scripts.js:2 Uncaught ReferenceError: exports is not defined
at index.js:2
at e.exports.execScript (uxp://uxp-internal/domjs_scripts.js:2)
at l (uxp://uxp-internal/domjs_scripts.js:2)
at uxp://uxp-internal/domjs_scripts.js:2
at s._executeCallbacks (uxp://uxp-internal/domjs_scripts.js:2)
at s._executeIfReady (uxp://uxp-internal/domjs_scripts.js:2)
at Array. (uxp://uxp-internal/domjs_scripts.js:2)
at s._executeCallbacks (uxp://uxp-internal/domjs_scripts.js:2)
at s.done (uxp://uxp-internal/domjs_scripts.js:2)
at Object.s [as loadHtmlContent] (uxp://uxp-internal/domjs_scripts.js:2)


I looked at index.js:2 and this is the line.

Object.defineProperty(exports, “__esModule”, { value: true });

For the record, I’m on a 2021 Macbook Pro Apple M1 Max, running Adobe Premiere Pro (Beta)Version 25.2.0 BETA (Build 55).

Any idea how to fix this issue? Thanks!

1 Like

So, I just tried deleting line2

“Object.defineProperty(exports, “__esModule”, { value: true });”

and the panel now works. But is deleting that line going to break anything else?

Hi johnpjenn,
This looks like a well-known issue when compiling ts into js. It won’t break anything if the line gets removed as you figured out (cleverly). Essentially, it’s just asking for a global exports that we did not need to define. One could also add <script> var exports ={}; </script> in the <head>

It won’t be the ultimate fix - we’ll need to adjust something in the configuration. We’ll add an instruction for this temp fix in the sample .ReadMe for now.
Thanks for jumping in on UXP, and thanks for developing for Premiere Pro.
-DMc

3 Likes

Hi!

I have pushed the fix (probably not the final fix though) for this issue and updated the ReadMe correspondingly. Right now, you should be able to build the plugin by running the following command at the html directory in terminal

  1. npm install
  2. npm run build
  3. npm run fix-imports

Thanks so much for trying out UXP, letting us know about the issue, and developing for Premiere Pro!

1 Like