Node.js

Rating: 
5
Your rating: None Average: 5 (5 votes)

Node.js is an open-source, cross-platform, JavaScript runtime environement that executes JavaScript code outside a web browser. With the supplied npm and npx binaries, Node.js opens a whole ecosystem of CLI tools. There are plenty of useful or fun Node.js modules, see for example this curated list: https://github.com/sindresorhus/awesome-nodejs/

This SFOS package provides Node.js v12.17.0, which ships npx for hassle-free execution of modules, and the updated npm should be compatible with all current modules.

The package installs Node.js in "/home/nemo/nodejs/" and sets required symbolic links to your $PATH. Modules installed with "npm -g" will be stored in "{prefix}/lib/node_modules/", i.e., "/home/nemo/nodejs/node-[version]/lib/node_modules/" by default. You can change the prefix using "npm config set prefix /path/to/prefix". Binaries of installed modules will be located in "{prefix}/bin" after you ran them once with npx, then you can add this directory to your $PATH or execute them directly from there instead of using npx for faster execution. Modules installed locally without the "-g" option will be placed in a "node_modules/" subfolder of the present working directory.

The uninstallation of this package is not agressive: it will preserve your "node_modules/" in case you reinstall Node.js later.

 

Screenshots: 
Application versions: 
AttachmentSizeDate
File nodejs-12.17.0-1.armv7hl.rpm13.63 MB02/06/2020 - 07:07
Changelog: 

- First SFOS package based on the 12.17.9 release.

Comments

usernamenotavailable's picture

Can you make a 64 bit package?

daywalker's picture

would be awesome if you could install it to $HOME because in SFOS4 the user is called defaultuser or someting customized. As a fallback it could be /home/nemo

Kabouik's picture

Absolutely. Actually most the applications I packaged were packaged before SFOS support for multiuser and the introduction of defaultuser in newly flashed devices. I'm aware of it but have been drowning in laziness so far to update the packages, I'm sorry. It's still planned though, but may not be so easy for packages that were compiled on device directly (instead of OBS using build instructions in a .spec file), as is the case with Node.js. Also I don't have any device running SFOS 3.4 yet as it would require a full reflash on my Pro1, so I'm postponing for now.

In the mean time, you could try making a symbolic link from defaultuser to nemo. It's not a pretty workaround but should work and ensure compatibility even with older apps that similarly hardcoded /home/nemo and are no longer updated. Please let me know if that works for you.