mirror of
https://github.com/asapach/peerflix-server.git
synced 2026-04-25 14:45:50 +03:00
[GH-ISSUE #10] Issue while using peerflix-server with forever in an init.d script #222
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zobrak on GitHub (Oct 28, 2014).
Original GitHub issue: https://github.com/asapach/peerflix-server/issues/10
Hi !
I was trying to launch peerflix server as a daemon with forever and I got always the same error while launching from an init.d script :
path.js:360
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at Object. (/usr/lib/node_modules/peerflix-server/server/store.js:11:21)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
error: Forever detected script exited with code: 8
error: Script restart attempt #4
To resolv this issue I did edit the store.js file and did this :
Now it works.
@asapach commented on GitHub (Oct 28, 2014):
The problem seems to be that the
HOMEenvironment variable is not set for the user you are running the script under. Can you try setting it explicitly?@zobrak commented on GitHub (Oct 28, 2014):
In fact the HOME is set :
printenv | grep HOMEHOME=/root@asapach commented on GitHub (Nov 2, 2014):
I'm using upstart on Ubuntu 14.04. Here's my config:
/etc/init/peerflix.confThe init script runs under
peerflix-useruser and sets up$HOMEvariable.