Comments (3)
Thanks! I was having the same issue and that got it working. Just had to change my systemd service to:
[Unit]
Description=Dasher
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/home/pi/dasher
ExecStart=/usr/bin/npm start
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
from dasher.
I created a systemd service for dasher and it is working well on boot. Here is my file if anyone is interested:
/etc/systemd/system/dasher.service
[Unit]
Description=Dasher
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/node /home/pi/dasher/app.js
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Once you create that file, you will need to reload, enable, and start it.
sudo systemctl daemon-reload
sudo systemctl enable dasher
sudo systemctl start dasher
You can check on the status of the service by typing this command.
sudo systemctl status dasher -l
from dasher.
For me both methods on a rpi jessie seem to fail.
Anyone has a solution?
pi@raspberrypi:/var/log $ tail syslog
Jan 29 11:24:11 raspberrypi npm[1285]: npm ERR! code ELIFECYCLE
Jan 29 11:24:11 raspberrypi npm[1285]: npm WARN This failure might be due to the use of legacy binary "node"
Jan 29 11:24:11 raspberrypi npm[1285]: npm WARN For further explanations, please read
Jan 29 11:24:11 raspberrypi npm[1285]: /usr/share/doc/nodejs/README.Debian
Jan 29 11:24:11 raspberrypi npm[1285]: npm ERR!
Jan 29 11:24:11 raspberrypi npm[1285]: npm ERR! Additional logging details can be found in:
Jan 29 11:24:11 raspberrypi npm[1285]: npm ERR! /home/pi/dasher/npm-debug.log
Jan 29 11:24:11 raspberrypi npm[1285]: npm ERR! not ok code 0
Jan 29 11:24:11 raspberrypi systemd[1]: dasher.service: main process exited, code=exited, status=1/FAILURE
Jan 29 11:24:11 raspberrypi systemd[1]: Unit dasher.service entered failed state.
pi@raspberrypi:/var/log $ tail /home/pi/dasher/npm-debug.log
10 error You can get their info via:
10 error npm owner ls dasher
10 error There is likely additional logging output above.
11 error System Linux 4.4.38-v7+
12 error command "/usr/bin/nodejs" "/usr/bin/npm" "start"
13 error cwd /home/pi/dasher
14 error node -v v0.10.29
15 error npm -v 1.4.21
16 error code ELIFECYCLE
17 verbose exit [ 1, true ]
after removing the init.d entry
sudo systemctl status dasher -l
● dasher.service - Dasher
Loaded: loaded (/etc/systemd/system/dasher.service; enabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2017-01-29 11:41:25 UTC; 2s ago
Process: 1195 ExecStart=/usr/bin/npm run start (code=exited, status=1/FAILURE)
Main PID: 1195 (code=exited, status=1/FAILURE)
Jan 29 11:41:25 raspberrypi systemd[1]: Unit dasher.service entered failed state
from dasher.
Related Issues (20)
- Using Dasher with a wifi repeater? HOT 1
- Can I include a 'conditional' statement in the config.json? HOT 1
- WiFi does not work HOT 3
- Unable to install HOT 2
- script/find_button
- Error: Socket hang up HOT 1
- Dasher Crash on Execute Command HOT 1
- Unexpected token } in JSON HOT 2
- Integration failing between Dasher and Homeassistant
- Unable to install on Raspberry Pi HOT 3
- Error when triggering a "command" containing double-quotes
- ECONNRESET Error....? HOT 1
- https and HA?
- URL error HOT 3
- NPM start issues HOT 6
- Buttonpress not registered
- Problem running command with second button HOT 1
- Finder doesn't find any buttons HOT 3
- Autostart Daemon Ubuntu HOT 2
- Inter-VLAN support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dasher.