Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I use https://volta.sh to manage the NodeJS versions in projects. It has a pin feature where it will define a section to record the NodeJS version and yarn version used the the package.json so every time I navigated to the project it will pick up the right version.
Windows -> Chocolately https://chocolatey.org/ choco install nodejs
I prefer this: https://www.npmjs.com/package/n
Usually nvm, but lately I use volta more and more.
Later on i discovered this script made by NodeSource that installs Node via their own repositories and then almost stopped installing binaries manually, i still do it though, but whenever possible i try to use that script
let fileSystemHandle = await showSaveFilePicker({suggestedName: 'node'}), writable, writer; await import('https://cdnjs.cloudflare.com/ajax/libs/pako/2.0.4/pako.min.js'); try { await import('https://unpkg.com/js-untar@2.0.0/build/dist/untar.js'); } catch (e) { console.log(e); } finally { // https://stackoverflow.com/a/65448758 const request = await fetch('node-v16.14.2-linux-x64.tar.gz'); const buffer = await request.arrayBuffer(); // Download gzipped tar file and get ArrayBuffer const decompressed = await pako.inflate(buffer); // Decompress gzip using pako const files = await untar(decompressed.buffer); // Get ArrayBuffer from the Uint8Array pako returns, untar, js-untar returns a list of files (See https://github.com/InvokIT/js-untar#file-object for details) writable = await fileSystemHandle.createWritable(); writer = writable.getWriter(); const file = files.find( ({ name }) => name === 'node-v16.14.2-linux-x64/bin/node' ).buffer; await writer.write(file); await writer.close(); }