Hi,
This is kind of a follow-up to my pb in Installing local plugin to a remote instance without relying on npm - #8 par GregRc, figured a new thread was better
Although I managed to install the simplelogo plugin from its git repository, I’m blocked since days trying to install other plugins like the quickstart with no success. Sometimes i could install simplelogo back, sometimes i couldn’t with same errors shown. So I tried to restart from the beginning by following @JohnLivingston tutorial at Plugin Peertube From Scratch - Vidéos Globenet but again I’m stuck at the first plugin install, with same errors below:
error[01/03/2023 15:01:14] Cannot install plugin /peertube-plugin-test, removing it...
{
"err": {
"err": {
"stack": "Error: Command failed: yarn add file:/peertube-plugin-test\nwarning package.json: No license field\nwarning No license field\nerror Package \"peertube-plugin-quickstart\" refers to a non-existing file '\"/plugins/updatevideo\"'.\n\n at ChildProcess.exithandler (node:child_process:402:12)\n at ChildProcess.emit (node:events:513:28)\n at maybeClose (node:internal/child_process:1100:16)\n at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)",
"message": "Command failed: yarn add file:/peertube-plugin-test\nwarning package.json: No license field\nwarning No license field\nerror Package \"peertube-plugin-quickstart\" refers to a non-existing file '\"/plugins/updatevideo\"'.\n",
"code": 1,
"killed": false,
"signal": null,
"cmd": "yarn add file:/peertube-plugin-test"
},
"stdout": "yarn add v1.22.19\n[1/4] Resolving packages...\ninfo Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.\n",
"stderr": "warning package.json: No license field\nwarning No license field\nerror Package \"peertube-plugin-quickstart\" refers to a non-existing file '\"/plugins/updatevideo\"'.\n"
}
}
warn[01/03/2023 15:01:14] Cannot unregister plugin undefined.
{
"err": {
"stack": "Error: Unknown plugin undefined to unregister\n at PluginManager.<anonymous> (/app/dist/server/lib/plugins/plugin-manager.js:185:23)\n at Generator.next (<anonymous>)\n at /app/node_modules/tslib/tslib.js:118:75\n at new Promise (<anonymous>)\n at Object.__awaiter (/app/node_modules/tslib/tslib.js:114:16)\n at PluginManager.unregister (/app/dist/server/lib/plugins/plugin-manager.js:181:24)\n at PluginManager.<anonymous> (/app/dist/server/lib/plugins/plugin-manager.js:266:28)\n at Generator.next (<anonymous>)\n at /app/node_modules/tslib/tslib.js:118:75\n at new Promise (<anonymous>)\n at Object.__awaiter (/app/node_modules/tslib/tslib.js:114:16)\n at PluginManager.uninstall (/app/dist/server/lib/plugins/plugin-manager.js:263:24)\n at PluginManager.<anonymous> (/app/dist/server/lib/plugins/plugin-manager.js:233:32)\n at Generator.throw (<anonymous>)\n at rejected (/app/node_modules/tslib/tslib.js:116:69)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)",
"message": "Unknown plugin undefined to unregister"
}
}
error[01/03/2023 15:01:14] Cannot uninstall plugin /peertube-plugin-test after failed installation.
{
"err": {
"stack": "TypeError: Cannot read properties of undefined (reading 'replace')\n at Function.normalizePluginName (/app/dist/server/models/server/plugin.js:147:24)\n at Function.loadByNpmName (/app/dist/server/models/server/plugin.js:21:27)\n at PluginManager.<anonymous> (/app/dist/server/lib/plugins/plugin-manager.js:271:55)\n at Generator.throw (<anonymous>)\n at rejected (/app/node_modules/tslib/tslib.js:116:69)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)",
"message": "Cannot read properties of undefined (reading 'replace')"
}
}
error[01/03/2023 15:01:14] Cannot remove plugin /peertube-plugin-test after failed installation.
{
"err": {
"stack": "Error: Invalid NPM plugin name to install\n at checkNpmPluginNameOrThrow (/app/dist/server/lib/plugins/yarn.js:63:15)\n at /app/dist/server/lib/plugins/yarn.js:34:9\n at Generator.next (<anonymous>)\n at /app/node_modules/tslib/tslib.js:118:75\n at new Promise (<anonymous>)\n at Object.__awaiter (/app/node_modules/tslib/tslib.js:114:16)\n at removeNpmPlugin (/app/dist/server/lib/plugins/yarn.js:33:20)\n at PluginManager.<anonymous> (/app/dist/server/lib/plugins/plugin-manager.js:238:58)\n at Generator.throw (<anonymous>)\n at rejected (/app/node_modules/tslib/tslib.js:116:69)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)",
"message": "Invalid NPM plugin name to install"
}
}
warn[01/03/2023 15:01:14] Cannot install plugin /peertube-plugin-test.
{
"err": {
"err": {
"stack": "Error: Command failed: yarn add file:/peertube-plugin-test\nwarning package.json: No license field\nwarning No license field\nerror Package \"peertube-plugin-quickstart\" refers to a non-existing file '\"/plugins/updatevideo\"'.\n\n at ChildProcess.exithandler (node:child_process:402:12)\n at ChildProcess.emit (node:events:513:28)\n at maybeClose (node:internal/child_process:1100:16)\n at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)",
"message": "Command failed: yarn add file:/peertube-plugin-test\nwarning package.json: No license field\nwarning No license field\nerror Package \"peertube-plugin-quickstart\" refers to a non-existing file '\"/plugins/updatevideo\"'.\n",
"code": 1,
"killed": false,
"signal": null,
"cmd": "yarn add file:/peertube-plugin-test"
},
"stdout": "yarn add v1.22.19\n[1/4] Resolving packages...\ninfo Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.\n",
"stderr": "warning package.json: No license field\nwarning No license field\nerror Package \"peertube-plugin-quickstart\" refers to a non-existing file '\"/plugins/updatevideo\"'.\n"
}
}
What’s strange there is references to "peertube-plugin-quickstart\ and /plugins/updatevideo\ which were local plugins I tried to install. Looks like any plugin installation will block because of those. I probably stacked several mistakes as I’m new to Peertube. First, as suggested in the other thread, I added this line to peertube/volumes my docker-compose:
- ~/sources/peertube-plugins/:/plugins:ro
so that I could have, thru a /plugins folder in my docker cli, access to my debian plugin files in ~/sources/peertube-plugins/. I thought that this way each plugin I’m working on would be a subfolder of ~/sources/peertube-plugins/ in debian. It worked nicely with the peertube-plugin-simplelogo subfolder as i could install this plugin. But any other folder would fail. Moreover, my UpdateVideo plugin folder was ~/sources/peertube-plugins/updatevideo instead of ~/sources/peertube-plugins/peertube-plugin-updatevideo and I wonder if this hasn’t made things worse. I tried renaming it with no success, no matter how much cache deleted or docker containers remounted. Logs always showed references to those paths. Plus, those folders have been deleted, so I don’t see why their names appear here. Looks like obsolete data stored somewhere.
I also tried modifying peertube/volumes in docker-compose.yml so that each plugin has its own alias, like:
~/sources/peertube-plugins/peertube-plugin-test/:/peertube-plugin-test:ro
which is not a desired solution as I don’t want to change this file for every new plugin, but anyway again, same errors.
So any help here would be greatly welcome