You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GraalVM's Node.js is based on a recent version of Node.js, and runs the GraalVM JavaScript engine instead of Google V8. Thus, some internal features (e.g., VM-internal statistics or configuration, profiling, debugging, etc.) are unsupported, or supported with potentially different behavior.
13
+
GraalVM's Node.js runtime is based on a recent version of Node.js, and runs the
14
+
GraalVM JavaScript engine instead of Google V8. Thus, some internal features (e.g.,
15
+
VM-internal statistics, configuration, profiling, debugging, etc.) are
16
+
unsupported, or supported with potentially different behavior.
14
17
15
-
The `node`executable is largely compatible with Node.js, and features additional GraalVM-specific functionalities (e.g., interoperability with Java and all other GraalVM languages).
18
+
The `node`command is largely compatible with Node.js, and features additional GraalVM-specific functionalities (e.g., interoperability with Java and all other GraalVM languages).
16
19
A list of available options can be obtained with `node --help`.
17
20
18
21
## Installing Packages Using `npm`
19
22
20
-
To install a Node.js package, you can use the `npm`executable in the `$GRAALVM_HOME/bin` folder of GraalVM.
21
-
The `npm`executable is equivalent to the default NPM command, and supports most of its options.
23
+
To install a Node.js package, you can use the `npm`launcher from the GraalVM's `/bin` folder.
24
+
The `npm`command is equivalent to the default NPM command, and supports most of its options.
22
25
23
26
An NPM package can be installed with:
24
-
```
27
+
```shell
25
28
$GRAALVM_HOME/bin/npm install <package>
26
29
```
27
-
As the `npm` executable of GraalVM is largely compatible with NPM, packages will be installed in the `node_modules` folder, as expected.
30
+
31
+
As the `npm` command of GraalVM is largely compatible with NPM, packages will be installed in the `node_modules` folder, as expected.
28
32
29
33
### Installing `npm` Packages Globally
30
34
@@ -33,7 +37,7 @@ By default, `npm` installs global packages in the path where the `node` executab
33
37
In GraalVM, this means that global packages will create files in the GraalVM folder.
34
38
To avoid writing to the GraalVM folder, the default global installation folder of `npm` can be modified by setting the `$PREFIX` environment variable, or by specifying the `--prefix` option when running `npm install`.
35
39
For example, the following command will install global packages in the `/foo/bar` folder:
Copy file name to clipboardExpand all lines: docs/user/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ engines, migration guides are available.
12
12
13
13
## Running JavaScript
14
14
15
-
GraalVM can execute plain JavaScript code:
15
+
GraalVM can run plain JavaScript code:
16
16
```shell
17
17
js [options] [filename...] -- [args]
18
18
```
@@ -26,7 +26,7 @@ To run Node.js-based applications, use the `node` utility bundled with GraalVM b
26
26
node [options] [filename] [args]
27
27
```
28
28
29
-
To install a Node.js module, use the `npm`executable from the GraalVM's `/bin` folder. The `npm`command is equivalent to the default Node.js command and supports all Node.js APIs.
29
+
To install a Node.js module, use the `npm`launcher from the GraalVM's `/bin` folder. The `npm`executable is equivalent to the default Node.js command and supports all Node.js APIs.
30
30
31
31
1. Install the `colors` and `ansispan` modules using `npm install` as
0 commit comments