View source: R/install-nodejs.R
| install_nodejs | R Documentation |
Downloads and installs Node.js to the shinyelectron cache directory. This allows using Node.js/npm without requiring system-wide installation.
install_nodejs(
version = NULL,
platform = NULL,
arch = NULL,
force = FALSE,
verbose = TRUE
)
version |
Character Node.js version to install. If NULL (default), automatically detects the latest LTS version. |
platform |
Character target platform ("win", "mac", "linux"). Default is current platform. |
arch |
Character target architecture ("x64", "arm64"). Default is current architecture. |
force |
Logical whether to reinstall if already exists. Default FALSE. |
verbose |
Logical whether to show progress. Default TRUE. |
Invisibly returns the path to the installed Node.js directory.
install_r_portable(), install_python_standalone() for other runtime installers.
# Install latest LTS version
install_nodejs()
# Install specific version
install_nodejs(version = "22.12.0")
# Force reinstall
install_nodejs(force = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.