What to install, to run a script in Javascript?

Booting, installing, newbie
Post Reply
Message
Author
Bushbuck
Posts: 179
Joined: Sat 26 Jan 2013, 01:33

What to install, to run a script in Javascript?

#1 Post by Bushbuck »

I've got a script written in Javascript, first line is
#!/usr/bin/env node

Does anyone know the name of what I need to install, to make this run? When I type "javascript" into PPM, I get a long list of things.
Xenial Puppy 64, Gigabyte motherboard, Intel i7 4770.

matchpoint
Posts: 168
Joined: Fri 26 Jan 2018, 20:54

#2 Post by matchpoint »

Bushbuck, without more details I'd say you're looking for this Java Runtime.

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#3 Post by OscarTalks »

I've not actually tried to do this, but a quick search suggests that there are various solutions. One of the most commonly used is node.js http://nodejs.org
Maybe try installing the binary in /usr/bin (I would also strip and chown it)
Then run

Code: Select all

node yourscript.js
Oscar in England
Image

Bushbuck
Posts: 179
Joined: Sat 26 Jan 2013, 01:33

#4 Post by Bushbuck »

I think that's probably the thing, Oscar. I'll try that, thanks.

[Edit] Success! Thanks again.
Xenial Puppy 64, Gigabyte motherboard, Intel i7 4770.

Post Reply