glfs/general/genlib/nodejs.xml
Douglas R. Reno d514a90c5e Update to Samba-4.13.1
Update to node.js-14.15.0
Update to libass-0.15.0
Update to qpdf-10.0.2
sendmail: Remove unnecessary bridgehead for Additional Downloads

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23855 af4574ff-66df-0310-9fd7-8a98e5e911e0
2020-10-31 02:08:59 +00:00

245 lines
7.3 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY nodejs-download-http "https://nodejs.org/dist/v&nodejs-version;/node-v&nodejs-version;.tar.xz">
<!ENTITY nodejs-download-ftp " ">
<!ENTITY nodejs-md5sum "af8ccb850472edd9668876a6119c8896">
<!ENTITY nodejs-size "32 MB">
<!ENTITY nodejs-buildsize "747 MB (add 35 MB for tests)">
<!ENTITY nodejs-time "10.5 SBU (using parallelism=4; add 2.9 SBU for tests)">
<!-- timing may be shorter on intel -->
]>
<sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
<?dbhtml filename="nodejs.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Node.js-&nodejs-version;</title>
<indexterm zone="nodejs">
<primary sortas="a-nodejs">nodejs</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Node.js</title>
<para>
<application>Node.js</application> is a
<application>JavaScript</application> runtime built on
<application>Chrome's</application> V8 JavaScript engine.
</para>
&lfs10_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&nodejs-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&nodejs-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &nodejs-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &nodejs-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &nodejs-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &nodejs-time;
</para>
</listitem>
</itemizedlist>
<!--<note>
<para>
This tarball was created using a BSD version of
<application>tar</application> and extracting it with a linux&trade;
version will produce harmless warnings about unknown extended header
keywords.
</para>
</note>-->
<bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="which"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="c-ares"/>,
<xref linkend="icu"/>,
<xref linkend="libuv"/>, and
<xref linkend="nghttp2"/>
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<ulink url="https://github.com/nodejs/http-parser">http-parser</ulink> and
<ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
<command>npm</command> will be installed if not present)
</para>
<para condition="html" role="usernotes">
User Notes: <ulink url="&blfs-wiki;/nodejs"/>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of Node.js</title>
<para>
Build <application>Node.js</application> by running the following
commands:
</para>
<screen><userinput>./configure --prefix=/usr \
--shared-cares \
--shared-libuv \
--shared-openssl \
--shared-nghttp2 \
--shared-zlib \
--with-intl=system-icu &amp;&amp;
make</userinput></screen>
<para>
To test the results, issue: <command>make test-only</command>.
<!--One test, test-dns, is known to fail.-->
<!-- When using make check, a module is used that wasn't shipped properly
with the 12.16.2 release. See Ticket #13379 for details. We should
probably restore "make check" after the next version of Node.js.
This new command skips the documentation and lint checks. -renodr-->
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make install &amp;&amp;
ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para>
<parameter>- -with-intl=system-icu</parameter>: use the system version
of <application>icu</application>. Other values are
<option>full-icu</option> (to build a local, full
<application>icu</application> library) and <option>small-icu</option>
(to build a local, minimal <application>icu</application> library).
</para>
<para>
<!-- FIXME : reinstate nghttp2 in this if build is fixed
FIXME cont: Seems to be fixed in 12.18.1 -renodr
<parameter>\-\-shared-{cares,libuv,nghttp2,openssl,zlib}</parameter>: -->
<parameter>--shared-{cares,libuv,nghttp2,openssl,zlib}</parameter>:
use the system installed libraries instead of local copies.
</para>
<para>
<option>--without-npm</option>: do not build
<application>npm</application> (use if you'd like to build a separate
<application>npm</application> later).
</para>
<para>
<option>--shared-http-parser</option>: use the system
installed library instead of a local copy.
</para>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Library</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
node, npm, and npx
</seg>
<seg>
None
</seg>
<seg>
/usr/include/node,
/usr/lib/node_modules/npm,
/usr/share/doc/{node,node-&nodejs-version;}, and
/usr/share/systemtap/tapset
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="node">
<term><command>node</command></term>
<listitem>
<para>
is the server-side JavaScript runtime.
</para>
<indexterm zone="nodejs node">
<primary sortas="b-node">node</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="npm">
<term><command>npm</command></term>
<listitem>
<para>
is the <application>Node.js</application> package manager.
</para>
<indexterm zone="nodejs npm">
<primary sortas="b-npm">npm</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry>
<term><filename class='directory'>/usr/lib/node_modules/npm/</filename></term>
<listitem>
<para>
is the installation root for Node.js executables and libraries.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>