Struggling with “not found” modules

I’ve been making my own plugins and am struggling when I make new ones (in some cases) with the plugin not being able to find installed modules

For example I’ve just installed a previously made plugin on a fresh Volumio install and it’s saying “cannot find axios”. Axios is installed, and it’s listed in my package.json file.

What else do I need to do for it to find this and other packages?

As a related question - when I am copying a plugin to a new install of volumio, how do I get volumio to recognise it? I can’t run the usual plugin refresh command as it needs to be initialised first, but I don’t want to do that as I already have the code!

Any help appreciated!

Aint that just volumio plugin update ?

From your plugin folder, remove node_modules and run

volumio plugin install

It will build node_modules according to package.json and install the plugin.

Thanks both!