Error from Jobe sandbox server: Language 'nodejs' is not known

Error from Jobe sandbox server: Language 'nodejs' is not known

de Peter Sander -
Número de respuestas: 4

As they say, "worked last year".

Now I'm having issues running nodejs which used to work. This is surely some error in our installation or configuration, but we're running out of ideas...

nodejs not found

En respuesta a Peter Sander

Re: Error from Jobe sandbox server: Language 'nodejs' is not known

de Richard Lobb -

The simplest explanation is of course that nodejs is not installed on your Jobe server. Has the Jobe server been upgraded since last year? If so, I think you need to talk to your sysadmins. The standard install instructions include installation of nodejs but perhaps something broke during the install?

The first thing to check is the list of languages supported by your Jobe server. The URL

http:///jobe/index.php/restapi/languages

gives you the current list but if the Jobe server is firewalled (as it should be) you probably can't easily get at that url with a browser. A solution is to run a coderunner Python question with the code

import urllib.request

with urllib.request.urlopen("http://localhost/jobe/index.php/restapi/languages") as infile:
    print(infile.read().decode('utf8'))

On our new 2022 production server, the output from that is

[["c","9.3.0"],["cpp","9.3.0"],["java","11.0.13"],["nodejs","10.19.0"],["octave","5.2.0"],["pascal","3.0.4"],["php","7.4.3"],["python3","3.9.1"]]

Note that nodejs appears in the third position. What is your output?

If nodejs is missing, the bash command

sudo apt-get install nodejs

should install it. But note that after installing you will need to reboot the server to rebuild the language cache file.

En respuesta a Richard Lobb

Re: Error from Jobe sandbox server: Language 'nodejs' is not known

de Peter Sander -
Here's the result of running your Python question:

import urllib.request
with urllib.request.urlopen("http://localhost/jobe/index.php/restapi/languages") as infile:
print(infile.read().decode('utf8'))

Got
[["c","9.3.0"],["cpp","9.3.0"],["java","11.0.2"],["nodejs","16.13.2"],["octave","5.2.0"],["pascal","3.0.4"],["php","7.4.3"],
["python2","2.7.18"],["python3","3.8.10"]]

So it seems that nodejs is installed, although a different version from yours.
En respuesta a Peter Sander

Re: Error from Jobe sandbox server: Language 'nodejs' is not known

de Peter Sander -
Our OOPS - the system guys just restarted the server and it seems that nodejs has turned up for work again.
Should have done that before bothering you, but thanks for the quick response anyway!
En respuesta a Peter Sander

Re: Error from Jobe sandbox server: Language 'nodejs' is not known

de Richard Lobb -
Good to hear! I was just staring at the source code in total bafflement, thinking "That can't happen"!