require('uxp').pluginManager gets undefined

I’m trying to access PluginManager API but seems it returns undefined when I try to get it.

I saw in the documentation this is the right code:

const { pluginManager } = require("uxp");

Tried also this:

const pluginManager = require("uxp").pluginManager;

Same retults, both returns “undefined”.

Does PluginManager isn’t available yet or what is happening?

I want to use to for this command I saw in the documentation:

PluginManager.showPanel(PANELID);

Any help is very much appreciated.

Mario OM

1 Like

It would help if you added links to the docs at least :thinking:

Here you go:

https://developer.adobe.com/photoshop/uxp/2022/uxp/reference-js/Modules/uxp/Plugin%20Manager/PluginManager/

Works as expected here:

1 Like

I might be doing something wrong because I tried in the console same as you and I got it undefined:

image

My PS is 24.1.0

And this is the info of my CC

It didn’t fit in the image but the CC Library is 3.22.1.3

Mine is also Ps v24.1
I’m on Win10 x64

CCD is 5.9.1.377 though (and all other versions are a bit newer), but I doubt this would matter

1 Like

It is very weird, I canno’t think about something else that could be the issue for this

What does your manifest file look like?

Also, is everything in “uxp” module undefined or just a pluginManager?

I got undefined too with “manifestVersion”: 5
lowering it to 4 did return the object, strange

It sounds like a bug…

Only that from UXP is undefined. I’ll need to check if more are like this one but at the moment only the pluginManager.

This is my manifest:

{
  "id": "ONIRICUXP",
  "name": "Oniric 2",
  "version": "2.0.0",
  "main": "index.js",
  "host": [
    {
      "app": "PS",
      "minVersion": "23.0.0",
      "data": {
        "apiVersion": 2,
        "loadEvent": "use"
      }
    }
  ],
  "manifestVersion": 5,
  "entrypoints": [
    {
      "type": "panel",
      "id": "vanilla",
      "minimumSize": {
        "width": 260,
        "height": 290
      },
      "maximumSize": {
        "width": 260,
        "height": 950
      },
      "preferredDockedSize": {
        "width": 260,
        "height": 950
      },
      "preferredFloatingSize": {
        "width": 260,
        "height": 950
      },
      "label": {
        "default": "Oniric 2"
      }
    }
  ],
  "icons": [
    {
      "width": 23,
      "height": 23,
      "path": "icons/dark.png",
      "scale": [
        1,
        2
      ],
      "theme": [
        "darkest",
        "dark",
        "medium"
      ]
    },
    {
      "width": 23,
      "height": 23,
      "path": "icons/light.png",
      "scale": [
        1,
        2
      ],
      "theme": [
        "lightest",
        "light"
      ]
    }
  ]
}