source: general/genlib/nodejs.xml@ d283912

12.0 12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since d283912 was cb594b6c, checked in by Xi Ruoyao <xry111@…>, 12 months ago

general: Remove non-exist User Notes link

Part of User Notes removal by
https://www.linuxfromscratch.org/~xry111/remove-nonexist-usernote.sh

  • Property mode set to 100644
File size: 7.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY nodejs-download-http "https://nodejs.org/dist/v&nodejs-version;/node-v&nodejs-version;.tar.xz">
8 <!ENTITY nodejs-download-ftp " ">
9 <!ENTITY nodejs-md5sum "ab4dbb04d13f8b4cb14e610fef5f9760">
10 <!ENTITY nodejs-size "39 MB">
11 <!ENTITY nodejs-buildsize "985 MB (add 64 MB for tests)">
12 <!ENTITY nodejs-time "17 SBU (add 4.5 SBU for tests: both using parallelism=4 and 4 CPUs online, parts of the tests will use all online CPUs)">
13]>
14
15<sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
16 <?dbhtml filename="nodejs.html"?>
17
18
19 <title>Node.js-&nodejs-version;</title>
20
21 <indexterm zone="nodejs">
22 <primary sortas="a-nodejs">nodejs</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Node.js</title>
27
28 <para>
29 <application>Node.js</application> is a
30 <application>JavaScript</application> runtime built on
31 <application>Chrome's</application> V8 JavaScript engine.
32 </para>
33
34 &lfs113_checked;
35
36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
39 <para>
40 Download (HTTP): <ulink url="&nodejs-download-http;"/>
41 </para>
42 </listitem>
43 <listitem>
44 <para>
45 Download (FTP): <ulink url="&nodejs-download-ftp;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download MD5 sum: &nodejs-md5sum;
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download size: &nodejs-size;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Estimated disk space required: &nodejs-buildsize;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated build time: &nodejs-time;
66 </para>
67 </listitem>
68 </itemizedlist>
69
70<!--
71 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
72 <itemizedlist spacing="compact">
73 <listitem>
74 <para>
75 Required patch:
76 <ulink url="&patch-root;/node-v&nodejs-version;-icu_69-1.patch"/>
77 </para>
78 </listitem>
79 </itemizedlist>
80-->
81
82 <bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
83
84 <bridgehead renderas="sect4">Required</bridgehead>
85 <para role="required">
86 <xref linkend="which"/>
87 </para>
88
89 <bridgehead renderas="sect4">Recommended</bridgehead>
90 <para role="recommended">
91 <xref linkend="c-ares"/>,
92 <xref linkend="icu"/>,
93 <xref linkend="libuv"/>, and
94 <xref linkend="nghttp2"/>
95 </para>
96
97 <bridgehead renderas="sect4">Optional</bridgehead>
98 <para role="optional">
99 <ulink url="https://github.com/nodejs/http-parser">http-parser</ulink> and
100 <ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
101 <command>npm</command> will be installed if not present)
102 </para>
103
104
105 </sect2>
106
107 <sect2 role="installation">
108 <title>Installation of Node.js</title>
109
110<!--
111 <para>
112 First, apply a patch to fix building Node.js against ICU-69.1:
113 </para>
114
115<screen><userinput>patch -Np1 -i ../node-v&nodejs-version;-icu_69-1.patch</userinput></screen>
116-->
117<!-- Does not appear to be needed for version 18.13.0
118 <para>
119 The <command>configure</command> script for this version of Node.js is
120 not aware of Python-3.11. If you have installed <xref linkend="python3"/>,
121 apply the following change:
122 </para>
123
124<screen><userinput>sed -e '/=.*exec/a command -v python3.11 >/dev/null &amp;&amp; exec python3.11 "$0" "$@"' \
125 -e s'/((/((3, 11), (/' \
126 -i configure</userinput></screen>
127-->
128 <para>
129 Build <application>Node.js</application> by running the following
130 commands:
131 </para>
132
133<screen><userinput>./configure --prefix=/usr \
134 --shared-cares \
135 --shared-libuv \
136 --shared-openssl \
137 --shared-nghttp2 \
138 --shared-zlib \
139 --with-intl=system-icu &amp;&amp;
140make</userinput></screen>
141
142 <para>
143 To test the results, issue: <command>make test-only</command>.
144 Three tests (of 3800 tests), test-net-socket-connect-without-cb,
145 test-tcp-wrap-listen, and test-dns-perf_hooks, are known to fail.
146<!--
147Failed tests:
148out/Release/node /tmp/node-v18.14.1/test/parallel/test-cluster-bind-privileged-port.js
149-->
150 </para>
151
152 <para>
153 Now, as the <systemitem class="username">root</systemitem> user:
154 </para>
155
156<screen role="root"><userinput>make install &amp;&amp;
157ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
158 </sect2>
159
160 <sect2 role="commands">
161 <title>Command Explanations</title>
162
163 <para>
164 <parameter>--with-intl=system-icu</parameter>: use the system version
165 of <application>icu</application>. Other values are
166 <option>full-icu</option> (to build a local, full
167 <application>icu</application> library) and <option>small-icu</option>
168 (to build a local, minimal <application>icu</application> library).
169 </para>
170
171 <para>
172 <parameter>--shared-{cares,libuv,nghttp2,openssl,zlib}</parameter>:
173 use the system installed libraries instead of local copies.
174 </para>
175
176 <para>
177 <option>--without-npm</option>: do not build
178 <application>npm</application> (use if you'd like to build a separate
179 <application>npm</application> later).
180 </para>
181
182 <para>
183 <option>--shared-http-parser</option>: use the system
184 installed library instead of a local copy.
185 </para>
186
187 </sect2>
188
189 <sect2 role="content">
190 <title>Contents</title>
191
192 <segmentedlist>
193 <segtitle>Installed Programs</segtitle>
194 <segtitle>Installed Library</segtitle>
195 <segtitle>Installed Directories</segtitle>
196
197 <seglistitem>
198 <seg>
199 corepack, node, npm, and npx
200 </seg>
201 <seg>
202 None
203 </seg>
204 <seg>
205 /usr/include/node,
206 /usr/lib/node_modules/{corepack,npm},
207 /usr/share/doc/{node,node-&nodejs-version;}, and
208 /usr/share/systemtap/tapset
209 </seg>
210 </seglistitem>
211 </segmentedlist>
212
213 <variablelist>
214 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
215 <?dbfo list-presentation="list"?>
216 <?dbhtml list-presentation="table"?>
217
218 <varlistentry id="corepack">
219 <term><command>corepack</command></term>
220 <listitem>
221 <para>
222 is an experimental tool to help with managing versions of package
223 managers.
224 </para>
225 <indexterm zone="nodejs corepack">
226 <primary sortas="b-corepack">corepack</primary>
227 </indexterm>
228 </listitem>
229 </varlistentry>
230
231 <varlistentry id="node">
232 <term><command>node</command></term>
233 <listitem>
234 <para>
235 is the server-side JavaScript runtime
236 </para>
237 <indexterm zone="nodejs node">
238 <primary sortas="b-node">node</primary>
239 </indexterm>
240 </listitem>
241 </varlistentry>
242
243 <varlistentry id="npm">
244 <term><command>npm</command></term>
245 <listitem>
246 <para>
247 is the <application>Node.js</application> package manager
248 </para>
249 <indexterm zone="nodejs npm">
250 <primary sortas="b-npm">npm</primary>
251 </indexterm>
252 </listitem>
253 </varlistentry>
254
255 <varlistentry>
256 <term>
257 <filename class="directory">/usr/lib/node_modules/npm/</filename>
258 </term>
259 <listitem>
260 <para>
261 is the installation root for Node.js executables and libraries
262 </para>
263 </listitem>
264 </varlistentry>
265
266 </variablelist>
267
268 </sect2>
269
270</sect1>
Note: See TracBrowser for help on using the repository browser.