Publishing plugin modules

I update my raspdac plugin and publish it with the volumio plugin helper utility to the volumio-plugins github.
Recently, I did a bugfix for my raspdac plugin concerning the epoll node module ( not compatible with the current volumio Node version).
So I made a PR with the new epoll node module.

Sayato just publish one of his plugins (audiophonics onoff) and I notice something:
He remove all of the node_modules from his pull request, and just reference them in the package.json file using the repository entry :

  "name": "audiophonicsonoff",
  "version": "1.0.3",
  "description": "Minimized Audiophonics plugin for button management, copied from RaspDac by Jedail",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  "author": "Saiyato",
  "license": "GPL-3.0",
  "volumio_info": {
    "prettyName": "Audiophonics ON/OFF",
    "icon": "fa fa-cogs",
    "plugin_type": "system_controller"
  "dependencies": {
	"balanced-match": "^1.0.0",
	"bindings": "^1.3.0",
	"brace-expansion": "^1.1.11",
	"concat-map": "^0.0.1",
	"epoll": "^1.0.2",
	"fs-extra": "^0.28.0",
	"fs.realpath": "^1.0.0",
	"glob": "^7.1.2",
	"graceful-fs": "^4.1.11",
	"imurmurhash": "^0.1.4",
	"inflight": "^1.0.6",
	"inherits": "^2.0.3",
	"jsonfile": "^2.4.0",
	"kew": "^0.7.0",
	"klaw": "^1.3.1",
	"minimatch": "^3.0.4",
	"multimap": "^1.0.2",
	"nan": "^2.8.0",
	"net": "^1.0.2",
	"once": "^1.4.0",
	"onoff": "^1.2.0",
	"path-is-absolute": "^1.0.1",
	"rimraf": "^2.6.2",
	"slide": "^1.1.6",
	"v-conf": "^1.4.2",
	"wrappy": "^1.0.2",
	"write-file-atomic": "^1.3.4"
  "devDependencies": {},
  "repository": {
    "type": "git",
    "url": "git+"
  "keywords": [
  "bugs": {
    "url": ""
  "homepage": ""

So, my question is :
What is the best solution when publishing a plugin for Volumio ?

You should PR without the modules, the Volumio team will build the modules needed, based on the package.json of course.

Ok I see…
Last question : what is the best practice to speed up the approval & publishing of plugins ( ?
Repository way and let the volumio team build the modules or provide them in PR ?

If I’m not mistaken they will build the modules themselves, this also confirms the package.json is OK.
So you just PR your plugin, without the node_modules directory.

If it builds correctly, they will move forward with testing the plugin. If not, you will be notified.

But unfortunately, this leads to node modules mistakenly being committed to the master repo as well - bloating up the entire repo quite a lot.
I think a rethink of the plugin repo might be due!

That’s exactly what we’re trying to avoid: bloat the repo with node_modules .
The plugin helper should make it impossible to do that… (there’s also a gitignore file) but no matter what we keep on receiving PRs with integrated node_modules (and I fear we will need to rebase the repo soon, loosing all commit history…)

Do you have a suggestion on how to avoid that?

For the node_modules issue - How we solved it at Balbuze’s repo is a simple addition in the .gitignore

# Ignore all node_modules in all sub dirs

Would you be against have a system like Volumio Build platforms - every plugin is hosted in a separate repo, and we use the main repo only to host the releases?
As the number of plugins grow, it not really great to have to clone the entire repo with all of them to make a (small) change in one plugin. Particularly given the usecase of people using the pluginhelper and cloning onto their SD cards?

Very strange .
I just restart from scratch for my plugin (clean volumio install)
I ran

volumio plugin init

then I update my plugin code (avoiding node_modules folder)
finally, I just ran

volumio plugin publish

The publish command launch the npm install (No modules found, running “npm install”) and push all the node_modules to my volumio_plugins fork.
If I’ll make a new pull request, i will post all node_modules.
Adding node_modules to .gitignore is a good solution.

Well, there was a commit 22 days ago adding node_modules to the gitignore
But that being said - there are quite a few commits of “updating <plugin_name> version xx” that contain the node_modules folder.

We could rebase and delete the folder from the history (with something like this) but then don’t know what happens to all the forked repos then.

I know I sound like a stuck record - but maybe this is a good time to rethink how the pugin repo management is done!
for more motivation -

volumio plugin init

will download ~42Mb of data - including all every plugin’s binaries.