Closed cntrl-z-forlife closed 6 months ago
Hmm. In Ubuntu, sudu npm start
is all that is necessary to make it work on 80. What distro are you running on your PI? What's the error message it's giving you?
Running Raspberry Pi OS(updated version of Raspbian). Here are the errors:
glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] { errno: -13, code: 'EACCES', syscall: 'scandir', path: '/root/.npm/_logs' }
up to date in 8s events.js:291 throw er; // Unhandled 'error' event ^
Error: listen EACCES: permission denied 0.0.0.0:80
at Server.setupListenHandle [as _listen2] (net.js:1293:21)
at listenInCluster (net.js:1358:12)
at Server.listen (net.js:1444:7)
at Function.listen (/home/pirate/monero-dashboard/node_modules/express/lib/application.js:618:24)
at Object.
oh interesting. So it's throwing an error trying to write logs and gain access to the port. I wonder if the first is cascading into the 2nd.
Try creating that path as root (/root/.npm/_logs
) and providing access chmod -r 755 /root/.npm
then running it again.
@cntrl-z-forlife Try adding this to /etc/sysctl.conf
net.ipv4.ip_unprivileged_port_start=0
I am running this node on a raspberry pi, and set the .env variable PORT=80. Running sudo npm start did not provide the privileges necessary. How do I grant the node.js access to port 80?