IONIC - 2 Installing NodeJs
Click here for more videos available on our youtube channel !To start an Ionic project we need Node.js, so we begin by installing it. Head over to the official Node.js website. The page automatically detects your operating system and shows a message like "Download for macOS" if you are on a Mac. The same works on Windows and Linux, with the right link suggested for your system.
We pick the LTS (Long Term Support) version, which is the most stable build, and click to download it. Once the package is downloaded, we open it to launch the installation wizard. The wizard walks you through the introduction, the license agreement (read it if you need to and accept), the destination on disk, and finally the install step. On macOS the system asks for your password before installing; the installation itself is quick.
Verifying the installation
Once it finishes, we want to confirm Node.js is properly installed on the machine. Open a terminal and run the following command, which prints the installed Node.js version:
node -v
The terminal answers with something like v16.13.0, which confirms that Node.js is correctly installed.
One last thing to keep in mind: Node.js is neither a server nor a framework. It is simply a JavaScript runtime environment that can be used to write server-side services, often exposed as APIs (Application Programming Interfaces). In that sense, Node.js is an alternative to traditional server languages such as PHP, and we will rely on it as the foundation to install and run the Ionic tooling in the next lesson.
Summary
This lesson guides you through downloading and installing Node.js from the official website as a prerequisite for Ionic development. You'll learn to select the LTS (Long Term Support) version, follow the installation wizard for your operating system (macOS, Windows, or Linux), and verify the installation using the command line. Node.js is a JavaScript runtime environment—not a server or framework—that enables server-side JavaScript execution and API creation.
Key points
- Download Node.js from the official nodejs.org website and select the LTS version for stability
- Run the installer and follow the setup wizard, which works on macOS, Windows, and Linux
- Verify installation success by running 'node -v' in your terminal to check the installed version
- Node.js is a JavaScript runtime environment, not a server or framework—it enables server-side JavaScript execution
- Node.js allows you to build APIs and server-side applications as an alternative to traditional server languages like PHP
FAQ
What is Node.js and why do we need it for Ionic?
Node.js is a JavaScript runtime environment that allows you to execute JavaScript on the server side. It is essential for Ionic development as it provides the runtime and tools needed to build and run your applications.
How do I verify that Node.js is correctly installed?
Open your terminal or command prompt and run the command 'node -v'. This will display the installed version number of Node.js, confirming that the installation was successful.
Should I download the LTS or the latest version of Node.js?
For Ionic development, the LTS (Long Term Support) version is recommended as it provides stability and is supported for an extended period, making it ideal for production applications.