Can't set up NodeBB
-
@frissdiegurke Not sure if this includes nodejs or not, doesn't seem to:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Just ran
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 installedwhich 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 commandnode
(that gets called from within the nodebb-file).I just found this.
The last paragraph shows that it could be your system installed it asnodejs
instead ofnode
. Trywhich nodejs
and if it shows/usr/bin/nodejs
runln /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
-
Great!
-
@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":
Package: node
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 byapt-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 usewhich node
and assign it to a variable... then use this variable instead ofnode
command. I think to have which as dependency isn't to much pain ^^
As long there are no naming-conflicts withnodejs
it should work -
See, I mentioned it here at the end of the install steps in the README
... 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 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?
-
@frissdiegurke said:
@julian I don't know what you wanted to do in
loader.js
, but #1450Every time I've found
nodejs
in the wild it was the crazy old stock version of the distribution. Sticking to thenode
command sounds kinda good to me. -
@frissdiegurke I don't hammer the API, so my plugin uses an lru-cache and expires stale entries after one day.
I imagine this is better if it were configurable, and to a more sensible default (perhaps default 2 hours?):
- julianlam/nodebb-plugin-github-embed#1
- julianlam/nodebb-plugin-github-embed#2
- julianlam/nodebb-plugin-github-embed#3
Edit: God damnit, my plugin doesn't like dashes either, it seems.