Installing a plugin from cli empty node_modules folder
Describe the bug
As stated in https://github.com/ether/etherpad-lite/wiki/Available-Plugins#manually-installing-plugins plugins installed from cli should use npm install --no-save --legacy-peer-deps ep_$plugin_name.
If i try to install one plugin after another one, node_modules is emptied and contains only the last installed plugin.
On a fresh install of tag 1.8.18 after running bin/
if run npm install --no-save --legacy-peer-deps ep_infini plugins is correctly installed and listed in node_modules. If i try to install another plugin with npm install --no-save --legacy-peer-deps ep_authornames
To Reproduce Steps to reproduce the behavior:
git clone --branch master https://github.com/ether/etherpad-lite.git
cd etherpad-lite
git co 1.8.18
bin/installDeps.sh
# node_modules contains ep_etherpad-lite -> ../src
npm install --no-save --legacy-peer-deps ep_infini # show added 1 package, removed 1271 packages, and audited 3 packages in 10s and node_modules contains only ep_infini
npm install --no-save --legacy-peer-deps ep_authornames
# node_modules contains only ep_authornames
Expected behavior
Installing a plugin should not empty node_modules folder, or the documentation about this should mention that all plugins need to be installed at once ?
Server (please complete the following information):
- Etherpad version: 1.8.18
- OS: Debian GNU/Linux 10 (buster)
- Node.js version (
node --version): v16.17.1 - npm version (
npm --version): 8.19.2
Sorry for the noise, after multiple digging in existing issues i've finally found #4714 and specially this comment that describe my bug https://github.com/ether/etherpad-lite/issues/4714#issuecomment-781934704
Feel free to close this ticket and mark it as duplicate :\
FYI: As far as I can see, it would help if the plugins add the peerDependency field in their package.json. Both ep_infini and ep_authornames don't do this yet. After that, you can use npm i --no-save $plugin (without --legacy-peer-deps) in recent npm versions.
Just try the same procedure with plugins like ep_align or ep_headings2, which already define such a peerDependency. iirc they don't cause the described problem.
it would help if the plugins add the peerDependency field in their package.json
I can do that for ep_infini, since i maintain this one, but not for others. Is an "official" plugin guideline ? If yes, it should be published somewhere.
There is a script: ./bin/plugins/checkPlugin.js that does various stuff.
The peerDependency was just a guess, as I noticed, that it works with plugins like ep_align or headings2 that have this field set. Unfortunately, node v14 seems to be broken right now (but it wasn't some month ago), so it's hard to find out if the peerDependency thing also works with v14...
thx for the info @webzwo0i i've pushed changed proposed by checkplugin on ep_infini :)
Related to #5643 ?
Related to #5643 ?
Sorry but i can't tell... This issue mention an older issue #4714 and i can't find any mention to the same bug in #5643 which is newer.
We can finally close this issue. Everything solved in Etherpad 2