To install Node.js on Debian 12, you can follow these steps:
Step 1 : Update the package index:
Step 2 : Install the required dependencies for Node.js:
Step 3 : Add the NodeSource repository to your package sources:
This command adds the Node.js 20.x repository. You can replace 20.x
with a different version if desired.
Step 4 : Install Node.js:
This command installs both Node.js and the npm package manager.
Step 5 : Verify the installation:
Check the installed versions of Node.js and npm:
You should see the respective versions displayed if the installation was successful.
Node.js is now installed on your Debian 12 system. You can begin using it to run Node.js applications or build web servers.