LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-27-2019, 09:08 PM   #1
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Rep: Reputation: 253Reputation: 253Reputation: 253
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.

Last edited by Lockywolf; 04-27-2019 at 09:16 PM.
 
Old 04-27-2019, 10:12 PM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
SlackBuilds
get the sbopkg browser for direct interface
https://sbopkg.org
write them . Then go to slackckBuild.org and read what it takes to write them and
present them.
https://slackbuilds.org/guidelines/

Last edited by Drakeo; 04-27-2019 at 10:14 PM.
 
2 members found this post helpful.
Old 04-28-2019, 12:27 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,226

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Honestly, I just have npm (and pip, and similar tools) install stuff into my home directory:

Code:
npm config set prefix ~/.local
export PATH=$PATH:$HOME/.local/bin

Last edited by dugan; 04-28-2019 at 12:28 PM.
 
1 members found this post helpful.
Old 04-28-2019, 01:49 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
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).
 
Old 04-29-2019, 02:36 AM   #5
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
Quote:
Originally Posted by bassmadrigal View Post
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?
 
Old 04-29-2019, 12:41 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Lockywolf View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
npm install latest broke npm Panicked Linux - Software 2 06-14-2017 03:57 PM
LXer: NPM creator starts a company to offer npm-related products and services LXer Syndicated Linux News 0 01-17-2014 09:50 AM
Hello everyone!!! Blessed linux Addmaxine LinuxQuestions.org Member Intro 0 09-07-2012 04:39 PM
LXer: Blessed by Trinity... LXer Syndicated Linux News 0 05-09-2011 05:50 PM
LXer: Kindle blessed by Microsoft over Linux-related patents LXer Syndicated Linux News 0 02-25-2010 06:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration