This is a tool that simply downloads the desired version of Node.js and unpacks it.
⚠️ Node.JS Apple Silicon support — Due to the lack of official binaries fordarwin-arm64(Apple Silicon) architectures for Node.JS versions before 16.0.0, this tool does not support downloading anydarwin-arm64binaries. Instead, it will download the binaries for thedarwin-x64(Intel Macs) architecture regardless of if the requested version supports Apple Silicon.
Although there are existing solutions like nvm, n, nodenv and potentially
more, all these solutions focus on installing nodejs globally and making it
available in the shell environment. In contrast what node-simple-downloader does is
simply downloading and extracting the desired Node.js version to a specified directory.
How the downloaded Node.js version is then used is totally up to the user.
The use-case that triggered the creation of this tool is that all our nodejs applications specify themselves which version of Node.js they need. This allows app developers to take care of maintaining the local Node.js installation without involvement of system operators.
Not yet. We are currently only planing on migrating away from researchgate/nodejs-installer and haven't finalized how it will work in the end. Once this is done we will share more details.
I always wanted to learn go and the scope of this tool seemed doable for
someone who hasn't worked with go before. So bear in mind that the code is probably not
structured and written in the best way possible. If you have suggestions feel
free to open PRs. I'm happy to learn how it can be done better.
The other decision to go with go is that having a single executable without a requirement for a
runtime, interpreter or package manager should make the setup easier in the end.
nsd nodejs /path/ --version 12.15.0package.json (exact version in engines field) and .nvmrc are currently supported.
nsd nodejs /path/ --version-from-file ./.nvmrcnsd yarn /path/ --version 1.22.5This will download the single javascript file and move it into the download directory with the name supplied to --single-file
nsd yarn /path/ --version 1.22.5 --single-file yarnpackage.json (exact version in engines field) is currently supported.
nsd nodejs /path/ --version-from-file ./package.jsonRequires go version 1.15 or newer
- Checkout project
- Run
go mod tidy - Run
cd nsd && go build
cd nsd && go test ./...