I would like to see the function of «nodebb-plugin-night-mode» in the community forum. 🙂
Hey guys! Using an Ubuntu 14.04 x64 512MB VPS on Digital Ocean, and I ran into an problem while installing. I followed this guide to the letter: https://github.com/designcreateplay/NodeBB/wiki/Installing-NodeBB-on-Ubuntu
I ran ./nodebb setup after doing all the stuff before that point and ran into this error:
What's going on here, and how can I fix it? I have nodejs installed. I had to apt-get install npm manually though, it wasn't included with the nodejs package.
I have nodejs installed
sure about that? what does
which node show?
@frissdiegurke Do I just run that in the terminal and tell you what it says? It's not showing anything.
how did you install nodejs then? self-compiled? you may have to include the node-binary into your PATH then.
@frissdiegurke Installed it via apt-get, according to that guide I linked to. Maybe including it in my path would fix it though, how do I do that?
should be if installed correctly by apt-get, try re-install or did you remove something from the PATH-variable manually?
echo $PATH should include sth. like
@frissdiegurke Not sure if this includes nodejs or not, doesn't seem to:
apt-get --reinstall install nodejs, $PATH didn't change.
ya, the PATH shouldn't change PATH is an environment variable that tells your system where to search for applications you don't specify with full path. if correctly installed nodejs should add a file 'node' into one of the paths (most likely /usr/bin, not 100% sure since I don't use ubuntu) the command
which checks every path within this variable if it contains such a file, so as conclusion correctly installed
which node should show sth. like
/usr/bin/node if it doesn't show anything as in your case nodejs cannot run because the system doesn't know that to do with the command
node (that gets called from within the nodebb-file).
I just found this.
The last paragraph shows that it could be your system installed it as
nodejs instead of
which nodejs and if it shows
ln /usr/bin/nodejs /usr/bin/node.
@julian Ping. You may want to include that case in your nodebb-script
@frissdiegurke Wow thanks, making that symlink worked. Got NodeBB installed successfully
@frissdiegurke Thanks for the debug -- it's an unusual scenario, and has actually been in the NodeBB docs since the earliest commits*, but was removed perhaps a month ago because it's not a typical use case.
What I imagine happened was @lukelarris installed the package "node", instead of "nodejs":
Amateur Packet Radio Node program
The node program accepts TCP/IP and packet radio network connections and
presents users with an interface that allows them to make gateway connections
to remote hosts using a variety of amateur radio protocols.
If you install "nodejs" on top of that, the executable becomes "nodejs".
apt-get remove node followed by
apt-get install nodejs does not restore the proper paths, either, the correct steps are:
apt-get --purge remove nodejs node
apt-get install nodejs
* It's been in the docs "since the earliest commits" because when I first tried installing Node.js, I typed in
apt-get install node
@julian but shouldn't it be easy to add this case? just test if
which nodejs results sth., otherwise use
which node and assign it to a variable... then use this variable instead of
node command. I think to have which as dependency isn't to much pain ^^
As long there are no naming-conflicts with
nodejs it should work
... but of course, it's gone now -- I wouldn't mind adding it back into the Ubuntu/Debian install wiki page
Yup, I can have
loader.js check which executable to run. Shouldn't be too difficult... #1449
@julian I don't know what you wanted to do in
loader.js, but #1450
@julian didn't install the node package, only installed nodejs, redis, and npm. It might have been installed with npm but idk.
@julian just notice that the github-embed plugin displays 'open' even so they're closed for 4h now, is this an issue of github somehow or does your plugin fail?
I imagine this is better if it were configurable, and to a more sensible default (perhaps default 2 hours?):
Edit: God damnit, my plugin doesn't like dashes either, it seems.
@lukelarris I run into the same issue in 14.04 server too. You need to install nodejs-legacy through apt and it's running well then