Issues with setup of custom plugins
Good day,
Currently i am working on a custom plugin for sysreptor. I so far only copied the demo-plugin and followed the instructions on the setup page. However when trying to access the page http://localhost:8000/static/plugins/f78daa28-c7f1-48cf-9738-26be0c4c0e70/index.html i get a 404.
This is an issue in the frontend since i can call the backend/api-functionality without a problem.
As far as i am aware this is an issue in the build, since the index.html file does not exist in the folder but rather in the child-folder called demopluginmodels.
Hi,
this seems to be a problem with the frontend build. Running npm run generate in the frontend directory should output the built frontend files in the demoplugin/static/ directory (configured in frontend/nuxt.config.ts via nitro.output.publicDir) . Are there any error messages?
Maybe the nuxt layers are not loaded. In frontend/package.json they are included as relative paths to the SysReptor repository. Try to update the paths and see if builds work.
Exactly. How am i supposed to include these files in the repository i created for sysreptor-plugins as described in the documentation? This is the docker-container specified in the documentation:
FROM node:22-alpine3.20 AS plugin-builder
# Build frontend assets
COPY custom_plugins /custom_plugins
RUN cd /custom_plugins/reviewbot/frontend && npm install && npm run generate
Here the file ../../../packages/plugin-base-layer does not exist, are we supposed to do a sparse checkout of the plugin-base-layer folder in order to also manage it inside our repository?
Yes, either a sparse checkout or as git submodule.
If you encounter other errors with the plugin docs, please let us know such that we can update the docs. We are also happy to accept pull requests :)
The issue still persists after solving the build issues. The index.html file is not located in static/plugins/f78daa28-c7f1-48cf-9738-26be0c4c0e70/index.html but under static/plugins/f78daa28-c7f1-48cf-9738-26be0c4c0e70/demopluginmodels/index.html.
Hi, we have created a small example repo for custom SysReptor plugins, including a nuxt frontend in the docker build. I hope this helps in resolving your problem.
https://github.com/Syslifters/sysreptor-plugin-example
Hi @joel-sass, Did you manage to resolve the issue? Or is there anything else we can help you with?