Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to run app.js #8

Open
stephanschulz opened this issue Jun 15, 2021 · 2 comments
Open

how to run app.js #8

stephanschulz opened this issue Jun 15, 2021 · 2 comments

Comments

@stephanschulz
Copy link

stephanschulz commented Jun 15, 2021

Thanks for making your project public.

I followed the install steps on my RPI4.
After running sh install.sh the PI rebooted and eventually the desktop shows.
I assume to start the player I need to npm start or something?

But I am not able to make it run.

Screen Shot 2021-06-15 at 5 43 00 PM

I did test that npm is installed with npm list and get:

[email protected] /home/pi/osc-node
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

cat /etc/os-release reports:

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

node app.js reports:

pi@raspberrypi:~/osc-node $ node app.js
Error: bind EADDRINUSE 0.0.0.0:57121
    at node:dgram:356:20
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -98,
  code: 'EADDRINUSE',
  syscall: 'bind',
  address: '0.0.0.0',
  port: 57121
}

Thanks for any tips.

@stephanschulz
Copy link
Author

ok I think I figured it out.

I had my PI start up in desktop mode.
I even tried omxplayer /home/pi/videos/barrel.mp4 and it did not player any videos.

But after setting the PI to boot in to command line mode OSC worked.

:)

@crecord
Copy link

crecord commented Aug 10, 2021

Hi Stephan,

I encountered the same issue, but found a different solution.

install.sh sets the script to startup and keep running by default using a node module called forever service
So in the background forever is unsuccessfully starting the script and using the port, thus the "EADDRINUSE" error.

To disable this and run the script from desktop mode you have to first run sudo forever-service delete osc-node

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

No branches or pull requests

2 participants