Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd service file for v2.0 (was: unexpected string in JSON after upgrade to v2) #6306

Closed
Artim96 opened this issue Apr 4, 2024 · 31 comments

Comments

@Artim96
Copy link

Artim96 commented Apr 4, 2024

Describe the bug
When running etherpad for the first time after update with sudo -u etherpad bin/run.sh, it complains about an unknown string in the settings, yet I can't see any difference to the template in the mentioned place.

We are coming from v1.9.2 (as far as I can tell). I had git to pull the latest versions and checked out to tags/v2.0.1, as we always did with previous updates. For the first run I had to run bin/run.sh it as root as otherwise it couldn't access /usr/local/lib/node_modules otherwise (and I don't think having the etherpad user own that directory is the best solution). Of course afterwards I re-owned all files in the etherpad directory by the etherpad user. It threw some fatal error - maybe because of tidyHtml setting still present, who knows - so I went through the whole settings.json, compared to the settings.json.template and made the appropriate changes. Yet running the etherpad from shell still results in

[2024-04-04T13:45:48.575] [ERROR] settings - There was an error processing your settings file from /opt/etherpad/etherpad-lite/settings.json: Unexpected string in JSON at position 129
/opt/etherpad/etherpad-lite/src:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  ep_etherpad-lite@2.0.1 dev: `node --import tsx node/server.ts "--emptyOutDir"`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

Or as the whole output:

sudo -u etherpad bin/run.sh --emptyOutDir
Installing dependencies...
Installing dev dependencies with pnpm
Scope: all 4 workspace projects
Lockfile is up to date, resolution step is skipped
Done in 3.5s
Clearing minified cache...
Creating the admin UI...

> admin@2.0.1 build /opt/etherpad/etherpad-lite/admin
> tsc && vite build

vite v5.1.6 building for production...
✓ 1626 modules transformed.

(!) outDir /opt/etherpad/etherpad-lite/src/templates/admin is not inside project root and will not be emptied.
Use --emptyOutDir to override.

computing gzip size (2)...[vite-plugin-static-copy] Copied 1 items.
../src/templates/admin/index.html                   0.49 kB │ gzip:   0.30 kB
../src/templates/admin/assets/index-DxlhTx9-.css    9.20 kB │ gzip:   2.78 kB
../src/templates/admin/assets/index-Cv1HbGYr.js   402.35 kB │ gzip: 128.90 kB
✓ built in 7.97s
Starting Etherpad...

> etherpad@2.0.1 dev /opt/etherpad/etherpad-lite
> pnpm --filter ep_etherpad-lite run dev "--emptyOutDir"


> ep_etherpad-lite@2.0.1 dev /opt/etherpad/etherpad-lite/src
> node --import tsx node/server.ts "--emptyOutDir"

[2024-04-04T13:45:48.554] [INFO] settings - All relative paths will be interpreted relative to the identified Etherpad base dir: /opt/etherpad/etherpad-lite
[2024-04-04T13:45:48.575] [ERROR] settings - There was an error processing your settings file from /opt/etherpad/etherpad-lite/settings.json: Unexpected string in JSON at position 129
/opt/etherpad/etherpad-lite/src:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  ep_etherpad-lite@2.0.1 dev: `node --import tsx node/server.ts "--emptyOutDir"`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

Here is the current settings.json we use, obviously with passwords redacted:
settings.json

Now I don't know how json interpreters read positions. But the only two positions that should be possible for position 129 should be either

{
  /*                                                                                                                                                                     
   * Name your instance!                                                                                                                                                 
   */
  "title": "Etherpad",

or

"favicon": null,

But in both cases there's no difference, even diff can't find one there. So what exactly is the issue?

Server (please complete the following information):

  • Etherpad version: v2.0.1
  • OS: [e.g., Ubuntu 20.04]: Debian 12.5
  • Node.js version (node --version): v18.19.0
  • npm version (npm --version): 9.2.0
  • pnpm version (pnpm --version): 8.15.6
  • Is the server free of plugins: -
@Artim96
Copy link
Author

Artim96 commented Apr 5, 2024

After finding a json linter that's able to handle comments, I noticed that my skinVariants constructs isn't correct, I've probably misunderstood that the option was there to define multiple themes. Also I forgot to close the second bracket from the users entry. The issue now is a working systemd service file node_modules/ep_etherpad-lite/node/server.js doesn't seem to exist anymore. But there are now several server.js files:

./src/node_modules/.ignored_etherpad-yajsml/server.js
./node_modules/.pnpm/etherpad-yajsml@0.0.12/node_modules/etherpad-yajsml/server.js
./node_modules/.pnpm/engine.io@6.5.4/node_modules/engine.io/build/server.js
./node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/server.js
./node_modules/.pnpm/react-router-dom@6.22.3_react-dom@18.2.0_react@18.2.0/node_modules/react-router-dom/dist/server.js
./node_modules/.pnpm/react-router-dom@6.22.3_react-dom@18.2.0_react@18.2.0/node_modules/react-router-dom/server.js
./node_modules/.pnpm/lucide-react@0.356.0_react@18.2.0/node_modules/lucide-react/dist/esm/icons/server.js

Which one would I need for the systemd file? The line I use to start the systemd service is
ExecStart=/usr/bin/node --experimental-worker /opt/etherpad/etherpad-lite/node_modules/ep_etherpad-lite/node/server.js

@Artim96 Artim96 changed the title unexpected string in JSON after upgrade to v2 systemd service file for v2.0 (was: unexpected string in JSON after upgrade to v2) Apr 5, 2024
@SamTV12345
Copy link
Member

You can give it a try with
ExecStart=/usr/bin/node --experimental-worker --import=tsx /opt/etherpad/etherpad-lite/node_modules/ep_etherpad-lite/node/server.ts. You need NodeJS 20 for that.

@Artim96
Copy link
Author

Artim96 commented Apr 5, 2024

Good to know. But how do I get the scripts to install all relevant dependencies? Because now when I run the run.sh, it gives me these errors:

WARN  Failed to create bin at /opt/etherpad/etherpad-lite/bin/node_modules/.bin/etherpad-lite. ENOENT: no such file or directory, open '/opt/etherpad/etherpad-lite/src/node/server.ts'
 WARN  Failed to create bin at /opt/etherpad/etherpad-lite/node_modules/.bin/etherpad-lite. ENOENT: no such file or directory, open '/opt/etherpad/etherpad-lite/node_modules/ep_etherpad-lite/node/server.ts'
 WARN  Failed to create bin at /opt/etherpad/etherpad-lite/bin/node_modules/.bin/etherpad-lite. ENOENT: no such file or directory, open '/opt/etherpad/etherpad-lite/bin/node_modules/ep_etherpad-lite/node/server.ts'
 WARN  Failed to create bin at /opt/etherpad/etherpad-lite/node_modules/.bin/etherpad-lite. ENOENT: no such file or directory, open '/opt/etherpad/etherpad-lite/node_modules/ep_etherpad-lite/node/server.ts'

Even removing the lock file doesn't fix this. Also the script keeps complaining about

(!) outDir /opt/etherpad/etherpad-lite/src/templates/admin is not inside project root and will not be emptied.
Use --emptyOutDir to override

@SamTV12345
Copy link
Member

You can do pnpm i in the root Etherpad directory. The second warning is normal and is nothing you need to worry about. We copy the admin pages into Etherpad and the admin directory is separate of Etherpad.

@Artim96
Copy link
Author

Artim96 commented Apr 5, 2024

The files still don't exits

@SamTV12345
Copy link
Member

Im wondering why. You did clone the GitHub repository?

@Artim96
Copy link
Author

Artim96 commented Apr 5, 2024

Yes. And I just had git sync up again (git pull origin develop, as for some reason the v2.0.1 tag isn't part of master), yet no fix.

@SamTV12345
Copy link
Member

Can you remove all node_modules folder in every directory and then do pnpm I again? Maybe something got out of sync.

@Artim96
Copy link
Author

Artim96 commented Apr 5, 2024

I had find delete all node_modules directories, had git pull from origin, checked out tags/v2.0.1, ran pnpm i, yet no change (all commands ran as the etherpad user owning the whole directory).

@SamTV12345
Copy link
Member

So you still get errors? Can you list every command on your Linux VM? Maybe I can replicate that.

@Artim96
Copy link
Author

Artim96 commented Apr 5, 2024

Well I started from v1.9.2. Then

git pull origin
git tag
git checkout tags/v2.0.1
bin/run.sh

All until now as the etherpad user. Because v2 switched to pnpm which works fundamentally different (and maybe because I didn't really initialize pnpm) it couldn't access somwhere in /usr/libs for the pnpm modules directory. So I ran bin/run.sh --root and afterwards chown -R etherpad:etherpad ./ to reset ownership. And another run of run.sh as the etherpad user that resulted in the first post. After you said server.ts could be ran by nodejs 20, I upgraded to that from v18 (via their Debian repo), changed the line in the service file, started the job and saw the errors in the journal:

Apr 05 22:21:53 www systemd[1]: etherpad.service: Main process exited, code=exited, status=1/FAILURE
Apr 05 22:21:53 www systemd[1]: etherpad.service: Failed with result 'exit-code'.
Apr 05 22:21:56 www systemd[1]: etherpad.service: Scheduled restart job, restart counter is at 7566.
Apr 05 22:21:56 www systemd[1]: Stopped etherpad.service - Etherpad-lite, the collaborative editor..
Apr 05 22:21:56 www systemd[1]: Started etherpad.service - Etherpad-lite, the collaborative editor..
Apr 05 22:21:56 www node[1609258]: node:internal/errors:496
Apr 05 22:21:56 www node[1609258]:     ErrorCaptureStackTrace(err);
Apr 05 22:21:56 www node[1609258]:     ^
Apr 05 22:21:56 www node[1609258]: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'tsx' imported from /opt/etherpad/etherpad-lite/
Apr 05 22:21:56 www node[1609258]:     at new NodeError (node:internal/errors:405:5)
Apr 05 22:21:56 www node[1609258]:     at packageResolve (node:internal/modules/esm/resolve:782:9)
Apr 05 22:21:56 www node[1609258]:     at moduleResolve (node:internal/modules/esm/resolve:831:20)
Apr 05 22:21:56 www node[1609258]:     at defaultResolve (node:internal/modules/esm/resolve:1036:11)
Apr 05 22:21:56 www node[1609258]:     at DefaultModuleLoader.resolve (node:internal/modules/esm/loader:251:12)
Apr 05 22:21:56 www node[1609258]:     at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:140:32)
Apr 05 22:21:56 www node[1609258]:     at DefaultModuleLoader.import (node:internal/modules/esm/loader:227:28)
Apr 05 22:21:56 www node[1609258]:     at node:internal/process/esm_loader:34:84
Apr 05 22:21:56 www node[1609258]:     at node:internal/per_context/primordials:544:39
Apr 05 22:21:56 www node[1609258]:     at new Promise (<anonymous>) {
Apr 05 22:21:56 www node[1609258]:   code: 'ERR_MODULE_NOT_FOUND'
Apr 05 22:21:56 www node[1609258]: }
Apr 05 22:21:56 www node[1609258]: Node.js v20.5.1
Apr 05 22:21:56 www systemd[1]: etherpad.service: Main process exited, code=exited, status=1/FAILURE
Apr 05 22:21:56 www systemd[1]: etherpad.service: Failed with result 'exit-code'.

So I installed tsx with pnpm (as root and form the root users home directory), but that issue actually continues showing up in the journal. But executing pnpm install tsx from etherpads root directory as etherpad user results in this message
 ERR_PNPM_ADDING_TO_ROOT  Running this command will add the dependency to the workspace root, which might not be what you want - if you really meant it, make it explicit by running this command again with the -w flag (or --workspace-root). If you don't want to see this warning anymore, you may set the ignore-workspace-root-check setting to true.
So I did not yet try that again. Everything after that was just a mix of git pull origin develop, git checkout tags/v2.0.1, find . -name "node_modules" -type d -exec rm -r {} \; and bin/run.sh.

@SamTV12345
Copy link
Member

Adapt your systemd service to this. That should hopefully work.

[Unit]
Description=Etherpad-lite, the collaborative editor.
After=syslog.target network.target

[Service]
Type=simple
User=etherpad
Group=etherpad
WorkingDirectory=/opt/etherpad
Environment=NODE_ENV=production
ExecStart=pnpm run prod
# use mysql plus a complete settings.json to avoid Service hold-off time over, scheduling restart.
Restart=always

[Install]
WantedBy=multi-user.target

@Artim96
Copy link
Author

Artim96 commented Apr 6, 2024

It still gives me the same complaints
etherpad.log

@SamTV12345
Copy link
Member

Can you go to the folder and do manually pnpm run prod?

@Artim96
Copy link
Author

Artim96 commented Apr 6, 2024

> etherpad@2.0.1 prod /opt/etherpad/etherpad-lite
> pnpm --filter ep_etherpad-lite run prod


> ep_etherpad-lite@2.0.1 prod /opt/etherpad/etherpad-lite/src
> node --import tsx node/server.ts

node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/opt/etherpad/etherpad-lite/src/node/server.ts' imported from /opt/etherpad/etherpad-lite/src/
    at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
    at new NodeError (node:internal/errors:405:5)
    at finalizeResolution (node:internal/modules/esm/resolve:226:11)
    at moduleResolve (node:internal/modules/esm/resolve:838:10)
    at defaultResolve (node:internal/modules/esm/resolve:1036:11)
    at DefaultModuleLoader.resolve (node:internal/modules/esm/loader:251:12)
    at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:140:32)
    at DefaultModuleLoader.import (node:internal/modules/esm/loader:227:28)
    at node:internal/modules/run_main:56:28
    at loadESM (node:internal/process/esm_loader:40:13)
    at async handleMainPromise (node:internal/modules/run_main:66:12) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.5.1
/opt/etherpad/etherpad-lite/src:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  ep_etherpad-lite@2.0.1 prod: `node --import tsx node/server.ts`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

@SamTV12345
Copy link
Member

If you did pnpm install before tsx should be there.

@Artim96
Copy link
Author

Artim96 commented Apr 6, 2024

I know that it should. Just to be sure, just ran it again:

sudo -u etherpad pnpm install
Scope: all 4 workspace projects
Lockfile is up to date, resolution step is skipped
Already up to date
 WARN  Failed to create bin at /opt/etherpad/etherpad-lite/bin/node_modules/.bin/etherpad-lite. ENOENT: no such file or directory, open '/opt/etherpad/etherpad-lite/src/node/server.ts'
 WARN  Failed to create bin at /opt/etherpad/etherpad-lite/node_modules/.bin/etherpad-lite. ENOENT: no such file or directory, open '/opt/etherpad/etherpad-lite/node_modules/ep_etherpad-lite/node/server.ts'
 WARN  Failed to create bin at /opt/etherpad/etherpad-lite/node_modules/.bin/etherpad-lite. ENOENT: no such file or directory, open '/opt/etherpad/etherpad-lite/node_modules/ep_etherpad-lite/node/server.ts'
 WARN  Failed to create bin at /opt/etherpad/etherpad-lite/bin/node_modules/.bin/etherpad-lite. ENOENT: no such file or directory, open '/opt/etherpad/etherpad-lite/bin/node_modules/ep_etherpad-lite/node/server.ts'
Done in 3.8s

@SamTV12345
Copy link
Member

Im wondering why there should be only 4. develop has already 6 workspaces.

@Artim96
Copy link
Author

Artim96 commented Apr 6, 2024

No idea

@SamTV12345
Copy link
Member

Other than that go to the package.json and remove the bin section. We don't really use it anymore so it should be safe to delete that.

@Artim96
Copy link
Author

Artim96 commented Apr 6, 2024

Result is still the same

@Artim96
Copy link
Author

Artim96 commented Apr 6, 2024

What exactly would it take to redo the installation from scratch? I can just save the settings.json and APIKEY.txt, purge the rest and pull everything fresh from github. The pads themselves are stored in the database.

@SamTV12345
Copy link
Member

Etherpad is since v2 a 1 line installation. You can just do pnpm I and everything installs itself. If you pull from develop you can even get rid of the apikey.

@Artim96
Copy link
Author

Artim96 commented Apr 6, 2024

I do need the APIkey as there is no other method left afaik for communication between etherpad and other software for reading from and writing to pads.

How is it with updates? How well can pnpm handle those? With git it was always quite easy. Also it's very easy with git to roll back to an older version if you find some issue (just like I did) and just don't have the time to bother with it at the moment.

@SamTV12345
Copy link
Member

It handles it better than npm. You can just pull from GitHub with git and then do pnpm install.

@Artim96
Copy link
Author

Artim96 commented Apr 8, 2024

Just done that, it tells me that it doesn't know the file extension .ts (after running pnpm run prod in the directory):

sudo -u etherpad pnpm run prod

> etherpad@2.0.1 prod /opt/etherpad
> pnpm --filter ep_etherpad-lite run prod


> ep_etherpad-lite@2.0.1 prod /opt/etherpad/src
> node --import tsx node/server.ts

node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /opt/etherpad/src/node/server.ts
    at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
    at new NodeError (node:internal/errors:405:5)
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:99:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:142:36)
    at defaultLoad (node:internal/modules/esm/load:91:20)
    at DefaultModuleLoader.load (node:internal/modules/esm/loader:263:26)
    at DefaultModuleLoader.moduleProvider (node:internal/modules/esm/loader:179:22)
    at new ModuleJob (node:internal/modules/esm/module_job:63:26)
    at #createModuleJob (node:internal/modules/esm/loader:203:17)
    at DefaultModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:156:34)
    at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:141:17)
    at DefaultModuleLoader.import (node:internal/modules/esm/loader:227:28)
    at node:internal/modules/run_main:56:28
    at loadESM (node:internal/process/esm_loader:40:13)
    at async handleMainPromise (node:internal/modules/run_main:66:12) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

Node.js v20.5.1
/opt/etherpad/src:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  ep_etherpad-lite@2.0.1 prod: `node --import tsx node/server.ts`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

even after adding tsx to the workspace root (pnpm install tsx -w)

EDIT: removing type: module from packages.json as recommended in a few different places doesn't help.

@Artim96
Copy link
Author

Artim96 commented Apr 9, 2024

My guess is this may be somehow related to TypeStrong/ts-node#1062 and similar issues as this seems to be quite a common error. Meanwhile I went back to v1.9.7 until v2 has found a solution that's more reliable than 50 % of the time.

@SamTV12345
Copy link
Member

Just done that, it tells me that it doesn't know the file extension .ts (after running pnpm run prod in the directory):

sudo -u etherpad pnpm run prod

> etherpad@2.0.1 prod /opt/etherpad
> pnpm --filter ep_etherpad-lite run prod


> ep_etherpad-lite@2.0.1 prod /opt/etherpad/src
> node --import tsx node/server.ts

node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /opt/etherpad/src/node/server.ts
    at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
    at new NodeError (node:internal/errors:405:5)
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:99:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:142:36)
    at defaultLoad (node:internal/modules/esm/load:91:20)
    at DefaultModuleLoader.load (node:internal/modules/esm/loader:263:26)
    at DefaultModuleLoader.moduleProvider (node:internal/modules/esm/loader:179:22)
    at new ModuleJob (node:internal/modules/esm/module_job:63:26)
    at #createModuleJob (node:internal/modules/esm/loader:203:17)
    at DefaultModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:156:34)
    at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:141:17)
    at DefaultModuleLoader.import (node:internal/modules/esm/loader:227:28)
    at node:internal/modules/run_main:56:28
    at loadESM (node:internal/process/esm_loader:40:13)
    at async handleMainPromise (node:internal/modules/run_main:66:12) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

Node.js v20.5.1
/opt/etherpad/src:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  ep_etherpad-lite@2.0.1 prod: `node --import tsx node/server.ts`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

even after adding tsx to the workspace root (pnpm install tsx -w)

EDIT: removing type: module from packages.json as recommended in a few different places doesn't help.

Wait you are again at NodeJS 20.5.1. Try it only with NodeJS 21 and it should work :)

@Artim96
Copy link
Author

Artim96 commented Apr 15, 2024

Wait you are again at NodeJS 20.5.1. Try it only with NodeJS 21 and it should work :)

As you recommended NodeJS 20 and as that's the latest LTS release, I was using that. But yes, after upgrading to 21 it finally works now. Would be great though if the minimal Node version would be clarified as the readme still lists "Node.js >= 18.18.2" as requirement. Also it would be great if the LTS versions would be the minimal required version, not the latest latest. Servers usually use distros like Debian, Ubuntu LTS and what not for a reason.

Now after having it running, I'm noticing a different issue: the admin user defined in the settings.json - that still worked back on v1.9.7 that I installed in the meantime - isn't able to log in anymore. The Etherpad just says "login failed" when navigating to /admin/settings and entering the account data into the new mask.
"showSettingsInAdminPage": true,
is set, just as

 "users": {
    "admin": {
      // 1) "password" can be replaced with "hash" if you install ep_hash_auth      
      // 2) please note that if password is null, the user will not be created      
      "password": "password",
      "is_admin": true
    },
  },

The eplite.error.log is empty.

@SamTV12345
Copy link
Member

Wait you are again at NodeJS 20.5.1. Try it only with NodeJS 21 and it should work :)

As you recommended NodeJS 20 and as that's the latest LTS release, I was using that. But yes, after upgrading to 21 it finally works now. Would be great though if the minimal Node version would be clarified as the readme still lists "Node.js >= 18.18.2" as requirement. Also it would be great if the LTS versions would be the minimal required version, not the latest latest. Servers usually use distros like Debian, Ubuntu LTS and what not for a reason.

Now after having it running, I'm noticing a different issue: the admin user defined in the settings.json - that still worked back on v1.9.7 that I installed in the meantime - isn't able to log in anymore. The Etherpad just says "login failed" when navigating to /admin/settings and entering the account data into the new mask. "showSettingsInAdminPage": true, is set, just as

 "users": {
    "admin": {
      // 1) "password" can be replaced with "hash" if you install ep_hash_auth      
      // 2) please note that if password is null, the user will not be created      
      "password": "password",
      "is_admin": true
    },
  },

The eplite.error.log is empty.

@webzwo0i found a way to run Etherpad with NodeJS<21 but code changes are required so this will be fixed in a future version.

@SamTV12345
Copy link
Member

Wait you are again at NodeJS 20.5.1. Try it only with NodeJS 21 and it should work :)

As you recommended NodeJS 20 and as that's the latest LTS release, I was using that. But yes, after upgrading to 21 it finally works now. Would be great though if the minimal Node version would be clarified as the readme still lists "Node.js >= 18.18.2" as requirement. Also it would be great if the LTS versions would be the minimal required version, not the latest latest. Servers usually use distros like Debian, Ubuntu LTS and what not for a reason.

Now after having it running, I'm noticing a different issue: the admin user defined in the settings.json - that still worked back on v1.9.7 that I installed in the meantime - isn't able to log in anymore. The Etherpad just says "login failed" when navigating to /admin/settings and entering the account data into the new mask. "showSettingsInAdminPage": true, is set, just as

 "users": {
    "admin": {
      // 1) "password" can be replaced with "hash" if you install ep_hash_auth      
      // 2) please note that if password is null, the user will not be created      
      "password": "password",
      "is_admin": true
    },
  },

The eplite.error.log is empty.

This is finally merged. You can continue running the startup commands as before but it is now NodeJS18 compatible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants