Closed justmwa closed 8 years ago
Looks like you've installed etherpad-lite as an app, then cloned it, edited the clone and tried to start that instead?
If that's correct, remove the app version and try starting your edited copy again.
If you do:
$ guv lsapps
You'll see a list of installed apps, probably containing etherpad-lite
or something similar - to remove it do:
$ guv rmapp etherpad-lite
Replace etherpad-lite
with whatever was shown as the app name in the output from guv lsapps
I didn't clone it, that's where it ended when installing it from guv-web. So removing it with rmapp leaves me with nothing as there is no clone.. Maybe that's how I should do it, cloning first? I am still worried by the lack of package.json for this app...
Ah, right. You mentioned that you created a package.json
, settings.json
and what looks like a shell script - where did you put them?
in /usr/local/guvnor/EkeRZPVAd.
Any changes you make in that directory will be undone if you update the app so tread carefully.
I've never used etherpad-lite but your best bet is to clone the etherpad-lite repo somewhere in your home directory and edit the files there.
From the looks of it, it's got a package.json
in the src directory but it doesn't have a main
field.
There's a bin
field in the existing package.json
that points to ./node/server.js
- maybe add a main
field that points to the same file?
If you can run node .
in the same directory as the package.json
and have it start up, then running guv start .
in that directory will start it under guvnor.
Thanks for your help, I'll look into having "node ." work properly. However, guv start bin/ethercalc works just fine with a package.json missing "main" and "node ." failing in a similar manner. Go figure!
If you pass a path to guv start
that is a file, it'll pass that to node, so guv start bin/ethercalc
is like running node bin/ethercalc
. If it's a directory and there's a package.json
present, node with use that to work out what it should be starting.
That said, if guv start bin/ethercalc
works and you are happy with running it from your home directory (or wherever that isn't under /usr/local/guvnor), then it sounds like job done.
Actually, ethercalc != etherpad. So I need to figure out what pleases node to have guv run etherpad, although ethercalc runs fine without "main" in package.json.
A simple start script does the job (without package.json). For some reason the same setup wouldn't work in /usr/local/guvnor, but as long as it works now, I'm happy.
It doesn't work in /usr/local/guvnor/EkeRZPVAd
because guvnor passes /usr/local/guvnor/EkeRZPVAd
as the path to load (e.g. it's like running $ node /usr/local/guvnor/EkeRZPVAd
) - there's no index.js
or package.json
in /usr/local/guvnor/EkeRZPVAd
so node has nothing to run and it fails.
In this case package.json
is actually in /usr/local/guvnor/EkeRZPVAd/src
but guvnor has no way of knowing that.
Anyway, glad you got it sorted.
Hi, I pulled etherpad-lite from github, configured settings.json, launched manually run.sh once, everything is fine. Now if I want to guv start it, it's another story! I created a minimal package.json to have npm start working, but it's still no go for guv. I created a basic script:
!/usr/bin/env node
var path = require("path"); var fs = require("fs"); var path = path.dirname(fs.realpathSync(__filename));
require(path + '/node_modules/ep_etherpad-lite/node/server'); which works if I guv start it, but I can't restart it afterwards: {"message":"Cannot find module '/usr/local/guvnor/EkeRZPVAd'","code":"MODULE_NOT_FOUND","stack":"Error: Cannot find module '/usr/local/guvnor/EkeRZPVAd'\n at Function.Module._resolveFilename (module.js:336:15)\n at Function.Module._load (module.js:278:25)\n at Module.require (module.js:365:17)\n at require (module.js:384:17)\n at /usr/lib/node_modules/guvnor/lib/daemon/process/ProcessWrapper.js:59:7\n at process._tickCallback (node.js:355:11)","date":1436947090396,"level":"error","timestamp":"2015-07-15T07:58:10.398Z"}
I'm not a coder so bear with me if all I did was stupid, but I'd really like to have guv start etherpad like other apps and not do a manual script just for this one. thanks!