When I ran the command yarn build --skip-os-packages
on my local system (MacBook Pro), I encountered errors. To troubleshoot, I decided to try running the command on a Linux machine. I cloned my code onto a Linux VM and executed yarn build-platform --linux
, which worked successfully.
For any Mac users/anyone else out there facing this issue, I recommend setting up the codebase on a Linux VM and running the build command there. This solution worked for me, and it should hopefully resolve the issue for you as well.
Next you need to build the plugin as a .zip file and then install it to your OpenSearch Dashboard distribution
You can follow the steps below for it:
cd plugins/yourplugin
# This command will ask you for OS Dashboard version you are using or tying to install your plugin with
yarn build
cd ../..
cd build/opensearch-dashboards-{OS Dashboard version}-SNAPSHOT-linux-x64
./bin/opensearch-dashboards-plugin install file://{/path/to/your/plugin.zip}