Namescoped plugins fails to run

github issue

I am trying to create a plugin with a name spaced package name (i.e. @<name-space>/<package-name>). When doing so it is unable to run or be installed. It has to be name scoped so that it can be published to a private npm registry.

It can be built ;however, it just fails to install in a kibana instance.

Has anyone else attempted to create a plugin under there circumstances?

I'm surprised to hear that this doesn't work, as far as I can tell there isn't any restriction on what the plugin id can be. What type of error are you getting?

When I call npm run start from the plugin dir I get the following error

optmzr log [14:40:50.969] [fatal] Error: ENOENT: no such file or directory, open '/Users/<path to kibana>/optimize/bundles/@<name-space>/<plugin-name>.entry.js

it's strange because npm run build completes sucessful, but if I go to install that plugin (using the official kibana docker image) in a Dockerfile I get the following error, when building the image.

Retrieving metadata from plugin archive Plugin installation was unsuccessful due to error "No kibana plugins found in archive"

Ah, yeah, that makes sense. There is probably a piece of the installation process that isn't expecting plugins to be nested in a directory. We use fs.readdir to see which plugins are in a plugins.scanDir directory, which means that we would find @namespace and not the acutal plugin directory. Sorry about that. If you want to play around with the plugin scanning code you might be able to get it working and I'd be happy to help you get it merged into open source, but it would probably be easier to just rewrite the name in your package.json at build time, before uploading an archive.

PS: What benefit do you receive from publishing the package to npm?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.