Etherpad-lite: Can't start server after installing plugins

Created on 11 Jun 2016  ·  9Comments  ·  Source: ether/etherpad-lite

I have just set up etherpad lite on my VPS and everything worked fine out of the box. However, no matter what plugin I tried to install it seems to crash the server instantly after a restart. Uninstalling the plugin through npm uninstall solves the problem, but doing this would mean that I can't use any plugins. I'm running Ubuntu 16.04 LTS, npm version 3.9.3, and nodejs version 6.2.1.

Here are the error messages:

etherpad@ubuntu:~/etherpad-lite$ bin/run.sh
Ensure that all dependencies are up to date... If this is the first time you have run Etherpad please be patient.
Ensure jQuery is downloaded and up to date...
Clearing minified cache...
Ensure custom css/js files are created...
Started Etherpad...
[2016-06-11 06:50:05.992] [ERROR] console - (node:30075) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[2016-06-11 06:50:07.934] [INFO] console - Installed plugins: [email protected]
[2016-06-11 06:50:07.939] [INFO] console - Report bugs at https://github.com/ether/etherpad-lite/issues
[2016-06-11 06:50:07.940] [INFO] console - Your Etherpad version is 1.6.0 (44370f1)
[2016-06-11 06:50:08.068] [ERROR] console - Error: ENOENT: no such file or directory, stat '/home/etherpad/etherpad-lite/node_modules/ep_cursortrace/locales'
at Error (native)
at fs.statSync (fs.js:981:18)
at extractLangs (/home/etherpad/etherpad-lite/src/node/hooks/i18n.js:21:9)
at getAllLocales (/home/etherpad/etherpad-lite/src/node/hooks/i18n.js:44:34)
at Object.exports.expressCreateServer as hook_fn
at normalizedhook (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:15:27)
at hookCallWrapper (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:21:14)
at /home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:76:14
at Function._.map._.collect (/home/etherpad/etherpad-lite/src/node_modules/underscore/underscore.js:172:24)
at Object.exports.callAll (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:75:24)
[2016-06-11 06:50:08.068] [INFO] console - graceful shutdown...
[2016-06-11 06:50:08.068] [INFO] console - db sucessfully closed.

Thanks for your time!

Serious Bug

All 9 comments

Same for me, this problem cannot be introduced very long ago. I wonder if this problem is due to the deprecated graceful-fs module or some new feature in etherpad, requiring plugins to have a locales-directory, breaking almost every plugin out there. I'm still trying to figure out a working combination of node and etherpad version :-/

Using the master-branch of etherpad instead of develop seems to work for me.

Yep it worked! Thank you so much for helping me out. I can close this issue now.

Well I would not close this issue, as this bug has to be fixed before it will be merged into master some day.

Thanks for reminding me. This does make a lot of sense. I'll reopen this issue.

The problem has been introduced by this commit: https://github.com/ether/etherpad-lite/commit/835bca7967473dc21fa6de4eb56357c92e4f43a3

fs.statSync can't be used synonymously to fs.exists. fs.statSync throws an exception if the file/direcotry does not exist. See https://blog.raananweber.com/2015/12/15/check-if-a-directory-exists-in-node-js/

cc @Gared

@ziyaointl Please try if my PR solves your problem

@Gared Yes, it seems to work with me.

Was this page helpful?
0 / 5 - 0 ratings