Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

server.js will not start #2

Closed
rob-dodson opened this issue Aug 18, 2019 · 8 comments
Closed

server.js will not start #2

rob-dodson opened this issue Aug 18, 2019 · 8 comments

Comments

@rob-dodson
Copy link

"npm start" exits with an error. I have little experience with node, npm, etc. But I think I have all dependencies installed.

Thanks,
Rob

$ uname -a
Linux ****.net 5.1.11-x86_64-linode127 #1 SMP PREEMPT Mon Jun 17 21:18:26 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ node --version
v10.16.3
$ npm --version
6.9.0

===

npm ERR! A complete log of this run can be found in:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 info lifecycle [email protected]
start: [email protected]
7 verbose lifecycle [email protected]start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/frog/stream.generative.fm/node_modules/.bin:/home/frog/bin:/home/frog/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
9 verbose lifecycle [email protected]start: CWD: /home/frog/stream.generative.fm
10 silly lifecycle [email protected]
start: Args: [ '-c', 'node server.js' ]
11 silly lifecycle [email protected]start: Returned: code: 1 signal: null
12 info lifecycle [email protected]
start: Failed to exec start script
13 verbose stack Error: [email protected] start: node server.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/frog/stream.generative.fm
16 verbose Linux 5.1.11-x86_64-linode127
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v10.16.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: node server.js
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@rdodson41
Copy link

@rob-dodson
Copy link
Author

If I comment out makeElectronProcess(); the server.js process will start and present the main web page by none of the links will play. I am running on ubuntu 16.4 and it seems that the electron process will not start.

@rob-dodson
Copy link
Author

I think maybe the problem here is that electron can't run unless it has a window to render to? For streaming can this dependency on electron be removed?

@rob-dodson
Copy link
Author

So, Electron requires a frame buffer run it seems like. On a headless linux installation you can run Xvfb and Electron will now start. However it will not play the tracks and I get no debugging output. Any ideas for next steps to get this working?

@rob-dodson
Copy link
Author

In headless mode on linux do we need electron to run?

@rob-dodson
Copy link
Author

Ok! Got it working. A lock file in /tmp was stopping the rendering of the mp3 stream. Since everything fails silently this was difficult to discover. In server.js set: ipc.config.silent = false; and many useful error messages appear.

So to run a headless server then: xvfb-run npm start in the stream.generative.fm directory.

@rob-dodson
Copy link
Author

Closing this issue. Running the streaming server on Linux just needs a virtual frame buffer to allow Electron to run.

@alexbainter
Copy link
Collaborator

alexbainter commented Feb 4, 2020

Hey sorry I missed all this. Glad you got it figured out. Apparently I didn't have notifications turned on this repo...

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

No branches or pull requests

3 participants