What's the "blessed" way to install npm modules on Slackware?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What's the "blessed" way to install npm modules on Slackware?
Hello, everyone.
I want to write a SlackBuild for pgadmin4, which is dependent on a number of things, in particular, some javascript code for user interface.
So it want a few javascript packages, notably, nodejs, yarn, cross-env.
As far as I understand, not all of those available on SBo yet. I want to write slackbuilds for them, but I am completely ignorant about the proper way to install npm/javascript modules on Slackware.
I guess I shouldn't just add 'npm install' in doinst.sh.
I.e., is there a typical slackbuild for installing javascript stuff that I can base mine upon.
You can use npm2tgz. You just tell it the module name and it will download it and create a Slackware package (I'm not sure how it deals with dependencies of those modules... whether they end up being self-contained or if you need to manually do each one).
You can use npm2tgz. You just tell it the module name and it will download it and create a Slackware package (I'm not sure how it deals with dependencies of those modules... whether they end up being self-contained or if you need to manually do each one).
Can those 'converted packages' be submitted to SBo? I mean, slackbuilds using npm2gtz internally?
Can those 'converted packages' be submitted to SBo? I mean, slackbuilds using npm2gtz internally?
They are strictly Slackware packages, not SlackBuilds. Unfortunately, with the way SlackBuilds are done and submitted to SBo, the SlackBuild isn't allowed to download the source, which means npm2tgz can't be used. The download location for the module has to be listed in the .info file. This means you would have to have the source or pre-compiled module already available before you run the SlackBuild, then you would just unpack that module and make it into a Slackware package.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.