etherpad-lite icon indicating copy to clipboard operation
etherpad-lite copied to clipboard

Unable to update plugin

Open oli415 opened this issue 6 years ago • 1 comments

I developed a small plugin (https://www.npmjs.com/package/ep_timestamp/v/0.1.4) two years ago that I now want to update. I cloned etherpad, created the settings.json file with the content from https://github.com/ether/etherpad-lite/wiki/Example-Development-Settings.JSON and ran npm install ep_timestamp.

This created the node_modules folder, where the ep_timestamp folder containing all plugin files was placed.

I then made some changes to the files but I noticed the following:

Changes to "templates/editbarButton.ejs" show in my browser when I run using bin/run.sh. However, when I change "static/js/timestamp.js" and run again, the changes do not show. I checked with Chrome developer tools and saw that the old timestamp.js file was still used.

I thought I might have missed some command, so I read the "Creating a plugin" page again. In there, it says you have to do npm install.

Now I tried that (supplying npm install with the local ep_timestamp folder). The result is that when I run bin/run.sh I get the following:

[2020-09-11 17:07:46.343] [ERROR] console - exception thrown: The "path" argument must be of type string. Received undefined [2020-09-11 17:07:46.343] [INFO] console - TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:122:11) at Object.resolve (path.js:980:7) at loadPlugin (/home/oli415/etherpad-lite/src/static/js/pluginfw/plugins.js:128:26) at /home/oli415/etherpad-lite/src/static/js/pluginfw/plugins.js:87:12 at Array.map () at exports.update (/home/oli415/etherpad-lite/src/static/js/pluginfw/plugins.js:86:33) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5)

I noticed that package-lock.json in the etherpad root folder first contained "version", "resolved" and "integrity" keys for ep_timestamp. After the npm install it contained only the key "version" which got set to "file:node_modules/ep_timestamp". I suspect something is wrong here, but I don't know how to fix it.

Help much appreciated!

  • OS: ArchLinux
  • Browser: Chrome
  • Version 83.0.4103.106

oli415 avatar Sep 11 '20 15:09 oli415

Afaik this is covered in developer docs but you need to disable cache.

MaxAge 0 and minify false in settings.json

JohnMcLear avatar Sep 11 '20 16:09 JohnMcLear