2017-04-23 15:06:22 +08:00
|
|
|
<?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;
|
|
|
|
|
2017-08-01 00:35:41 +08:00
|
|
|
<!ENTITY nodejs-download-http "https://nodejs.org/dist/v&nodejs-version;/node-v&nodejs-version;.tar.xz">
|
2017-04-23 15:06:22 +08:00
|
|
|
<!ENTITY nodejs-download-ftp " ">
|
2023-10-20 03:06:27 +08:00
|
|
|
<!ENTITY nodejs-md5sum "b57e634501db61d2080e2366ce87ea03">
|
2023-04-16 04:58:21 +08:00
|
|
|
<!ENTITY nodejs-size "39 MB">
|
2023-10-20 03:06:27 +08:00
|
|
|
<!ENTITY nodejs-buildsize "921 MB (add 31 MB for tests)">
|
|
|
|
<!ENTITY nodejs-time "7.6 SBU (add 3.5 SBU for tests: both using parallelism=8 and 8 CPUs online, parts of the tests will use all online CPUs)">
|
2017-04-23 15:06:22 +08:00
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
|
|
|
|
<?dbhtml filename="nodejs.html"?>
|
|
|
|
|
|
|
|
|
|
|
|
<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
|
2021-09-07 01:42:49 +08:00
|
|
|
<application>Chrome's</application> V8 JavaScript engine.
|
2017-04-23 15:06:22 +08:00
|
|
|
</para>
|
|
|
|
|
2023-08-20 04:19:27 +08:00
|
|
|
&lfs120_checked;
|
2017-04-23 15:06:22 +08:00
|
|
|
|
|
|
|
<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>
|
2021-05-17 00:38:58 +08:00
|
|
|
|
2021-06-19 02:29:14 +08:00
|
|
|
<!--
|
2021-05-06 23:36:33 +08:00
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Required patch:
|
|
|
|
<ulink url="&patch-root;/node-v&nodejs-version;-icu_69-1.patch"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
2021-06-19 02:29:14 +08:00
|
|
|
-->
|
2021-05-17 00:38:58 +08:00
|
|
|
|
2017-04-23 15:06:22 +08:00
|
|
|
<bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
|
|
<para role="required">
|
2021-09-07 01:42:49 +08:00
|
|
|
<xref linkend="which"/>
|
2017-04-23 15:06:22 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
|
|
<para role="recommended">
|
2018-11-14 06:16:10 +08:00
|
|
|
<xref linkend="c-ares"/>,
|
2020-06-03 22:32:26 +08:00
|
|
|
<xref linkend="icu"/>,
|
|
|
|
<xref linkend="libuv"/>, and
|
|
|
|
<xref linkend="nghttp2"/>
|
2017-04-23 15:06:22 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para role="optional">
|
2020-04-10 07:11:35 +08:00
|
|
|
<ulink url="https://github.com/nodejs/http-parser">http-parser</ulink> and
|
2017-07-31 00:16:18 +08:00
|
|
|
<ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
|
|
|
|
<command>npm</command> will be installed if not present)
|
2017-04-23 15:06:22 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Node.js</title>
|
|
|
|
|
2023-10-20 03:16:14 +08:00
|
|
|
<para>
|
|
|
|
If Python-3.12 is installed, fix the <command>configure</command> script:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>sed -e '/python3.11/i command -v python3.12 >/dev/null && exec python3.12 "$0" "$@"' \
|
|
|
|
-e '/3, 11/s/\(.3, 11.\)/(3, 12), \1/' \
|
|
|
|
-i configure</userinput></screen>
|
|
|
|
|
2017-04-23 15:06:22 +08:00
|
|
|
<para>
|
|
|
|
Build <application>Node.js</application> by running the following
|
|
|
|
commands:
|
|
|
|
</para>
|
|
|
|
|
2021-11-21 02:06:46 +08:00
|
|
|
<screen><userinput>./configure --prefix=/usr \
|
2021-10-29 12:00:18 +08:00
|
|
|
--shared-cares \
|
|
|
|
--shared-libuv \
|
|
|
|
--shared-openssl \
|
|
|
|
--shared-nghttp2 \
|
|
|
|
--shared-zlib \
|
|
|
|
--with-intl=system-icu &&
|
2017-04-23 15:06:22 +08:00
|
|
|
make</userinput></screen>
|
|
|
|
|
2020-03-10 22:12:43 +08:00
|
|
|
<para>
|
2020-04-10 07:11:35 +08:00
|
|
|
To test the results, issue: <command>make test-only</command>.
|
2023-10-20 03:06:27 +08:00
|
|
|
Ten tests (of 3817 tests) are known to fail
|
|
|
|
due to behavior differences between OpenSSL-3.0 and OpenSSL-3.1.
|
2023-02-17 10:20:16 +08:00
|
|
|
<!--
|
|
|
|
Failed tests:
|
2023-10-20 03:06:27 +08:00
|
|
|
out/Release/node - -tls-min-v1.0 /build/node/node-v18.18.2/test/parallel/test-https-agent-session-eviction.js
|
|
|
|
out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-alert.js
|
|
|
|
out/Release/node - -tls-max-v1.2 /build/node/node-v18.18.2/test/parallel/test-tls-cli-max-version-1.2.js
|
|
|
|
out/Release/node - -tls-max-v1.3 /build/node/node-v18.18.2/test/parallel/test-tls-cli-max-version-1.3.js
|
|
|
|
out/Release/node - -tls-min-v1.1 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.1.js
|
|
|
|
out/Release/node - -tls-min-v1.2 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.2.js
|
|
|
|
out/Release/node - -tls-min-v1.3 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.3.js
|
|
|
|
out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-getprotocol.js
|
|
|
|
out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-min-max-version.js
|
|
|
|
out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-session-cache.js
|
2023-02-17 10:20:16 +08:00
|
|
|
-->
|
2019-10-25 08:23:19 +08:00
|
|
|
</para>
|
2017-04-23 15:06:22 +08:00
|
|
|
|
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>make install &&
|
|
|
|
ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
2020-03-10 22:12:43 +08:00
|
|
|
<para>
|
2021-01-06 04:21:30 +08:00
|
|
|
<parameter>--with-intl=system-icu</parameter>: use the system version
|
2020-03-10 22:12:43 +08:00
|
|
|
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>
|
2017-04-23 15:06:22 +08:00
|
|
|
|
2020-03-10 22:12:43 +08:00
|
|
|
<para>
|
2020-06-19 06:57:22 +08:00
|
|
|
<parameter>--shared-{cares,libuv,nghttp2,openssl,zlib}</parameter>:
|
2020-03-10 22:12:43 +08:00
|
|
|
use the system installed libraries instead of local copies.
|
|
|
|
</para>
|
2017-04-23 15:06:22 +08:00
|
|
|
|
2020-03-10 22:12:43 +08:00
|
|
|
<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>
|
2017-04-23 15:06:22 +08:00
|
|
|
|
2020-03-10 22:12:43 +08:00
|
|
|
<para>
|
|
|
|
<option>--shared-http-parser</option>: use the system
|
|
|
|
installed library instead of a local copy.
|
|
|
|
</para>
|
2017-04-23 15:06:22 +08:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Library</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>
|
2022-11-09 04:12:07 +08:00
|
|
|
corepack, node, npm, and npx
|
2017-04-23 15:06:22 +08:00
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
None
|
|
|
|
</seg>
|
|
|
|
<seg>
|
2019-06-22 11:28:56 +08:00
|
|
|
/usr/include/node,
|
2022-07-14 06:12:03 +08:00
|
|
|
/usr/lib/node_modules/{corepack,npm},
|
2020-04-10 07:11:35 +08:00
|
|
|
/usr/share/doc/{node,node-&nodejs-version;}, and
|
2019-06-22 11:28:56 +08:00
|
|
|
/usr/share/systemtap/tapset
|
2017-04-23 15:06:22 +08:00
|
|
|
</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
2022-11-09 04:12:07 +08:00
|
|
|
<varlistentry id="corepack">
|
|
|
|
<term><command>corepack</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
is an experimental tool to help with managing versions of package
|
|
|
|
managers.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="nodejs corepack">
|
|
|
|
<primary sortas="b-corepack">corepack</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2017-04-23 15:06:22 +08:00
|
|
|
<varlistentry id="node">
|
|
|
|
<term><command>node</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2021-02-19 23:20:16 +08:00
|
|
|
is the server-side JavaScript runtime
|
2017-04-23 15:06:22 +08:00
|
|
|
</para>
|
|
|
|
<indexterm zone="nodejs node">
|
|
|
|
<primary sortas="b-node">node</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="npm">
|
|
|
|
<term><command>npm</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2021-02-19 23:20:16 +08:00
|
|
|
is the <application>Node.js</application> package manager
|
2017-04-23 15:06:22 +08:00
|
|
|
</para>
|
|
|
|
<indexterm zone="nodejs npm">
|
|
|
|
<primary sortas="b-npm">npm</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2021-02-19 23:20:16 +08:00
|
|
|
<term>
|
|
|
|
<filename class="directory">/usr/lib/node_modules/npm/</filename>
|
|
|
|
</term>
|
2017-04-23 15:06:22 +08:00
|
|
|
<listitem>
|
2020-03-10 22:12:43 +08:00
|
|
|
<para>
|
2021-02-19 23:20:16 +08:00
|
|
|
is the installation root for Node.js executables and libraries
|
2020-03-10 22:12:43 +08:00
|
|
|
</para>
|
2017-04-23 15:06:22 +08:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|