Interact with npm from the R console.
# install.packages("remotes") remotes::install_github("JohnCoene/npm")
library(npm) npm_install("browserify", scope = "global") npm_init() npm_install("jquerjqueryy") npm_run("--version")
Also see yarn.