Hello. I am developing a new plugin using the latest bookworm repo as a base.
The index.js of the plugin starts a http server, which severs static html/js app (made using React in a separate repo).
These are the steps I am following to install the plugin:
- SSH to Volumio
- Get latest branch / commits from my forked bookworm repo
- cd into the plugin directory of the repo locally on Volumio
- running “volumio install plugin”
The install process seems to go fine without issues but the plugin causes Volumio to not start and I see errors in the logs
Mar 16 18:42:23 volumio volumio[274404]: error: The plugin user_interface/stylish_player failed to load, setting it to stopped. Error: Error: Cannot find module '/data/plugins/user_interface/stylish_player/node_modules/kew/kew.js'. Please verify that the package.json has a valid "main" entry
Mar 16 18:42:23 volumio volumio[274404]: error: Stack trace: Error: Cannot find module '/data/plugins/user_interface/stylish_player/node_modules/kew/kew.js'. Please verify that the package.json has a valid "main" entry
The only way to make it work is to delete the node_modules + package-lock.json file from the /data/plugins/user_interface/my_plugin directory and npm install again.
After that everything works fine.
I am wondering if I am missing anything in the install.sh file.
#!/bin/bash
echo "Installing Stylish Player Dependencies"
cd /data/plugins/user_interface/stylish_player
echo "Installing node dependencies"
npm install --production
echo "Stylish Player plugin installed"
echo "plugininstallend"
uninstall.sh doesn’t do anything yet. Wondering if I need to manually delete node_modules and package-lock.json in this file.
#!/bin/bash
echo "Uninstalling Stylish Player"
echo "Done"
echo "pluginuninstallend"