Hi all,

I am writing a node.js app using bonescript and am using a systemctl 
service to start it on boot. I have written the service, which correctly 
fires the startup script but it errors out when trying to load bonescript. 
I can run the app from the command line just fine (node app.js) and it 
works, but when called from the service, it gives the following error:

Sep 25 09:42:43 brewbone brewbone[581]: at Function.Module._load 
(module.js:280:25)
Sep 25 09:42:43 brewbone brewbone[581]: at Module.require (module.js:362:17)
Sep 25 09:42:43 brewbone brewbone[581]: at require (module.js:378:17)
Sep 25 09:42:43 brewbone brewbone[581]: at Object.<anonymous> 
(/var/lib/cloud9/brewbone/lib/output.js:1:71)
Sep 25 09:42:43 brewbone brewbone[581]: at Module._compile 
(module.js:449:26)
Sep 25 09:42:43 brewbone brewbone[581]: at Object.Module._extensions..js 
(module.js:467:10)
Sep 25 09:42:43 brewbone brewbone[581]: at Module.load (module.js:356:32)
Sep 25 09:42:43 brewbone brewbone[581]: at Function.Module._load 
(module.js:312:12)
Sep 25 09:42:43 brewbone brewbone[581]: at Module.require (module.js:362:17)
Sep 25 09:42:43 brewbone brewbone[581]: [96B blob data]


My startup script is /user/bin/brewbone:

#!/bin/bash
nodemon /var/lib/cloud9/brewbone/app.js


The service is /lib/systemd/system/brewbone.service

[Unit]
Description=Brewbone Application
After=syslog.target

[Service]
ExecStart=/usr/bin/brewbone

[Install]
WantedBy=multi-user.target


The suspect line (output.js:1:71) is:

var b = require("bonescript");


Any ideas what could be causing the error?

Thanks,
Josh 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to