Comments (4)
Describe the bug I'm building a custom docker image of Etherpad which includes some public plugins and a single local one (not published to npm).
The command looks something like:
docker build --build-arg ETHERPAD_PLUGINS="ep_user_displayname ep_openid_connect ./ep_my_custom_plugin" --tag ether .
The build completes successfully, and plugins are installed correctly:
#13 [ 9/13] RUN { [ -z "ep_user_displayname ep_openid_connect ./ep_my_custom_plugin" ] || npm install --no-save --legacy-peer-deps ep_user_displayname ep_openid_connect ./ep_my_custom_plugin; } && src/bin/installDeps.sh && rm -rf ~/.npm #13 sha256:e52e9bed489766190c2ebb2c9883195caf4db1edc0a866e411658a4f2015aab6 j#13 31.10 npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) #13 49.08 npm WARN enoent ENOENT: no such file or directory, open '/opt/etherpad-lite/package.json' #13 49.08 npm WARN etherpad-lite No description #13 49.08 npm WARN etherpad-lite No repository field. #13 49.08 npm WARN etherpad-lite No README data #13 49.08 npm WARN etherpad-lite No license field. #13 49.08 #13 49.09 + [email protected] #13 49.09 + [email protected] #13 49.09 + [email protected] #13 49.09 added 819 packages from 1190 contributors and audited 813 packages in 48.122s #13 49.36 #13 49.36 79 packages are looking for funding #13 49.36 run `npm fund` for details #13 49.36 #13 49.36 found 26 vulnerabilities (18 moderate, 8 high) #13 49.36 run `npm audit fix` to fix them, or `npm audit` for details #13 49.91 Copy the settings template to settings.json... #13 49.91 Installing dependencies... #13 49.91 Installing production dependencies #13 63.28 added 351 packages in 12.462s #13 63.30 Clearing minified cache... #13 DONE 64.0s
However, when I start the container via:
docker run -p 9001:9001 --env-file .env ether
I'm getting an error that looks like this:
[2024-01-15T15:15:34.327] [ERROR] server - Error: Failed to get package 'ep_my_custom_plugin' Response error 404 Not Found at Object.<anonymous> (/opt/etherpad-lite/src/node_modules/live-plugin-manager/dist/src/httpUtils.js:68:19) at Generator.next (<anonymous>) at fulfilled (/opt/etherpad-lite/src/node_modules/live-plugin-manager/dist/src/httpUtils.js:24:58) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [2024-01-15T15:15:34.327] [INFO] server - Exiting... [2024-01-15T15:15:34.328] [INFO] server - Waiting for Node.js to exit... [2024-01-15T15:15:39.331] [ERROR] server - Something that should have been cleaned up during the shutdown hook (such as a timer, worker thread, or open connection) is preventing Node.js from exiting [2024-01-15T15:15:39.333] [ERROR] server - Enable `dumpOnUncleanExit` setting to get a dump of objects preventing a clean exit [2024-01-15T15:15:39.335] [ERROR] server - Forcing an unclean exit...
I suspect that it might be due to changes introduced by #6018.
*UPD: I was able to confirm that the 'breaking change' was indeed introduced the PR mentioned above, since using a commit before that one works well.
Server (please complete the following information):
- Etherpad version: 1.9.6
develop
branch (9c14a4f)
Thanks for the issue. I'll take a look. I hope the plugin was installed but only the error because the plugin is not available in npmjs is not handled properly.
from etherpad-lite.
I did some more research and was able to pinpoint that the error is being thrown in migratePluginsFromNodeModules
due to live-plugin-manager
trying to install a local package from npm.
I was also able to come up with a (very hacky) workaround:
await Promise.all(Object.entries(dependencies).map(async ([pkg, info]) => {
if (pkg.startsWith(plugins.prefix) && pkg !== 'ep_etherpad-lite') {
if (!Object.prototype.hasOwnProperty.call(info, '_resolved')) {
await exports.manager.installFromPath(`./${pkg}`)
} else {
await exports.manager.install(pkg)
}
}
}));
Hopefully, that can help you somehow in coming up with a proper fix.
from etherpad-lite.
Oh sorry. Haven't notified you. It should be fixed in develop.
from etherpad-lite.
Thanks! The problem seems to be fixed.
from etherpad-lite.
Related Issues (20)
- Change language strings (DE) HOT 2
- Error building personalized container HOT 2
- Fatal MySQL error: Error: read ECONNRESET in Docker logs HOT 7
- An error occurs when an image larger than 4M is uploaded using the "ep_image_upload" plugin HOT 1
- Unable to import files containing a `$` sign in their filename HOT 2
- How to capture paste event and modify HTML attributes HOT 2
- Where's the logic for the collaboration in real time html insertion?
- Bug: Accept-Language zh-Hant-TW/zh-TW got fallback'd to zh-hans instead of zh-hant HOT 4
- Online count not updating after new author assign
- Add docker development setup
- How to import pdf and images in etherpad on jitsi meet HOT 32
- Backend refactoring proposal: Step 1. multipackage monorepo
- Cleanup after workspace refactoring
- Cannot find module 'busboy' HOT 2
- Websocket not working on develop HOT 1
- New install : DirtyDB is used instead of Mysql database HOT 5
- Limit number of versions of a pad or delete them in Pad Settings HOT 5
- Add a configuration variable in docker image to handle plugins with a config
- How to change the admin password with Etherpad Lite that runs inside a docker container? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etherpad-lite.