Node Js 10.16.0 Download For Windows

1 view
Skip to first unread message

Gwenda Arguin

unread,
Aug 5, 2024, 5:30:31 AM8/5/24
to conslambburse
Ifyou are using Node.js professionally, find performance speed and system call compatibility important, want to run Docker containers that leverage Linux workspaces and avoid having to maintain both Linux and Windows build scripts, or just prefer using a Bash command line, then install Node.js on Windows Subsystem for Linux (more specifically, WSL 2).

Besides choosing whether to install on Windows or WSL, there are additional choices to make when installing Node.js. We recommend using a version manager as versions change very quickly. You will likely need to switch between multiple Node.js versions based on the needs of different projects you're working on. Node Version Manager, more commonly called nvm, is the most popular way to install multiple versions of Node.js, but is only available for Mac/Linux and not supported on Windows. Instead, we recommend installing nvm-windows and then using it to install Node.js and Node Package Manager (npm). There are alternative version managers to consider as well covered in the next section.


It is always recommended to remove any existing installations of Node.js or npm from your operating system before installing a version manager as the different types of installation can lead to strange and confusing conflicts. This includes deleting any existing Node.js installation directories (e.g., "C:\Program Files\nodejs") that might remain. NVM's generated symlink will not overwrite an existing (even empty) installation directory. For help with removing previous installations, see How to completely remove node.js from Windows.)


NVM is designed to be installed per-user, and invoked per-shell. It is not designed for shared developer boxes or build servers with multiple build agents. NVM works by using a symbolic link. Using nvm in shared scenarios creates a problem because that link points to a user's app data folder -- so if user x runs nvm use lts, the link will point node for the entire box to their app data folder. If user y runs node or npm, they will be directed to run files under x's user account and in the case of npm -g, they will be modifying x's files, which by default is not allowed. So nvm is only prescribed for one developer box. This goes for build servers too. If two build agents are on the same vm/box, they can compete and cause odd behavior in the builds.


Follow the install instructions on the windows-nvm repository. We recommend using the installer, but if you have a more advanced understanding of your needs, you may want to consider the manual installation. The installer will point you to the releases page for the most recent version.


Once the installation is complete. Open PowerShell (recommend opening with elevated Admin permissions) and try using windows-nvm to list which versions of Node are currently installed (should be none at this point): nvm ls


Install the latest stable LTS release of Node.js (recommended) by first looking up what the current LTS version number is with: nvm list available, then installing the LTS version number with: nvm install (replacing with the number, ie: nvm install 12.14.0).


To change the version of Node.js you would like to use for a project, create a new project directory mkdir NodeTest, and enter the directory cd NodeTest, then enter nvm use replacing with the version number you'd like to use (ie v10.16.3`).


To install Volta as your version manager (rather than windows-nvm), go to the Windows Installation section of their Getting Started guide, then download and run their Windows installer, following the setup instructions.


If you plan to collaborate with others, or host your project on an open-source site (like GitHub), VS Code supports version control with Git. The Source Control tab in VS Code tracks all of your changes and has common Git commands (add, commit, push, pull) built right into the UI. You first need to install Git to power the Source Control panel.


An Install Wizard is included that will ask you a series of questions about settings for your Git installation. We recommend using all of the default settings, unless you have a specific reason for changing something.


Using Node.js directly on Windows is great for learning and experimenting with what you can do. Once you are ready to build production-ready web apps, which are typically deployed to a Linux-based server, we recommend using Windows Subsystem for Linux version 2 (WSL 2) for developing Node.js web apps. Many Node.js packages and frameworks are created with a *nix environment in mind and most Node.js apps are deployed on Linux, so developing on WSL ensures consistency between your development and production environments. To set up a WSL dev environment, see Set up your Node.js development environment with WSL 2.


If you are in the (somewhat rare) situation of needing to host a Node.js app on a Windows server, the most common scenario seems to be using a reverse proxy. There are two ways to do this: 1) using iisnode or directly. We do not maintain these resources and recommend using Linux servers to host your Node.js apps.


I uninstalled my previous version of node.js (0.8.11) and downloaded the latest, 0.10.24 from the node.js website and installed it. However, after running node --version, it still indicates that I'm running v0.8.11. Obviously, some stuff was left behind during the uninstall process, and it's causing me to have all sorts of errors when trying to add modules through npm. I've seen solutions to this for OSX and Linux, but couldn't find anything for Windows. I'm running Windows 7 64-bit.


I ran into a problem where my version of NodeJS (0.10.26) could NOT be uninstalled nor removed, because Programs & Features in Windows 7 (aka Add/Remove Programs) had no record of my having installed NodeJS... so there was no option to remove it short of manually deleting registry keys and files.


I attempted to install the newest recommended version of NodeJS, but it failed at the end of the installation process and rolled back. Multiple versions of NodeJS also failed, and the installer likewise rolled them back as well. I could not upgrade NodeJS from the command line as I did not have SUDO installed.


SOLUTION: After spending several hours troubleshooting the problem, including upgrading NPM, I decided to reinstall the EXACT version of NodeJS on my system, over the top of the existing installation.


Now that Windows was aware of the forgotten NodeJS installation, I was able to uninstall my existing version of NodeJS completely. I then successfully installed the newest recommended release of NodeJS for the Windows platform (version 4.4.5 as of this writing) without a roll-back initiating.


In my case, the above alone didn't work. I had installed and uninstalled several versions of nodejs to fix this error: npm in windows Error: EISDIR, read at Error (native) that I kept getting on any npm command I tried to run, including getting the npm version with: npm -v.


If by mistake you tried uninstalling through cli (it will not remove completely most often), then you do not get the uninstall option in the control panel. In this case, install the same version of node and then follow step 1.


This library can be used to install/start/stop/uninstall Node scripts as Windows background services for production environments. This is not a tool for developing applications, it is a tool for releasing them.


However; it is possible to use node-windows without the global flag (i.e. install directly into the project root).More details regarding why this is not the recommended approach are available throughout this Readme.


Using native node modules on Windows can suck. Most native modules are not distributed in a binary format.Instead, these modules rely on npm to build the project, utilizing node-gyp.This means developers need to have Visual Studio (and potentially other software) installed on the system,just to install a native module. This is portable, but painful... mostly because Visual Studioitself is over 2GB.


node-windows does not use native modules. There are some binary/exe utilities, but everythingneeded to run more complex tasks is packaged and distributed in a readily usable format. So, no need forVisual Studio... at least not for this module.


node-windows has a utility to run Node.js scripts as Windows services. Please note that like allWindows services, creating one requires administrative privileges. To create a service withnode-windows, prepare a script like:


The code above creates a new Service object, providing a pretty name and description.The script attribute identifies the Node.js script that should run as a service. Upon runningthis, the script will be visible from the Windows Services utility.


Services created by node-windows are similar to most other services running on Windows.They can be started/stopped from the windows service utility, via NET START or NET STOP commands,or even managed using the scutility.


The user attribute is an object with three keys: domain,account, and password.This can be used to identify which user the service library should use to perform system commands.By default, the domain is set to the local computer name, but it can be overridden with an Active Directoryor LDAP domain. For example:


Both the account and password must be explicitly defined if you want the service module torun commands as a specific user. By default, it will run using the user account that launchedthe process (i.e. who launched node app.js).


If you want to instruct winsw to allow service account logins, specify allowServiceLogon: true. This is disabled by default since some users have experienced issues running this without service logons.


The other attribute is sudo. This attribute has a single property called password. By supplyingthis, the service module will attempt to run commands using the user account that launched theprocess and the password for that account. This should only be used for accounts with administrativeprivileges.


The built-in service recovery for Windows services is fairly limited and cannot easily be configuredfrom code. Therefore, node-windows creates a wrapper around the Node.js script. This wrapperis responsible for restarting a failed service in an intelligent and configurable manner. For example,if your script crashes due to an unknown error, node-windows will attempt to restart it. By default,this occurs every second. However; if the script has a fatal flaw that makes it crash repeatedly,it adds unnecessary overhead to the system. node-windows handles this by increasing the time intervalbetween restarts and capping the maximum number of restarts.

3a8082e126
Reply all
Reply to author
Forward
0 new messages