updated node.js install notes
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
Sure, here's a complete reference guide for a programmer coming from the Python world and getting into JavaScript programming, specifically focusing on package management and project setup:
|
||||
|
||||
# From Python to JavaScript: A Guide for Package Management and Project Setup
|
||||
|
||||
If you're a Python developer transitioning to JavaScript programming, you'll encounter some similarities as well as differences in how packages and dependencies are managed. This guide aims to provide you with a comprehensive overview of package management and project setup in the JavaScript ecosystem, drawing parallels with Python's tools and concepts you're familiar with.
|
||||
@@ -97,4 +95,60 @@ While there are some differences between the Python and JavaScript ecosystems wh
|
||||
|
||||
Remember, both `npm` and `yarn` are widely used and supported in the JavaScript ecosystem, but `yarn` is generally considered the more modern and preferred choice, similar to how `venv` is preferred over `virtualenv` in Python.
|
||||
|
||||
With this guide, you should have a solid understanding of how to transition from Python's package management tools to the JavaScript ecosystem, making it easier for you to work on and contribute to JavaScript projects, including those using popular frameworks like React or Gatsby.
|
||||
With this guide, you should have a solid understanding of how to transition from Python's package management tools to the JavaScript ecosystem, making it easier for you to work on and contribute to JavaScript projects, including those using popular frameworks like React or Gatsby.
|
||||
|
||||
---
|
||||
|
||||
To install Node.js on your Debian 12 system, follow these steps:
|
||||
|
||||
1. First, update the package index:
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
2. Install the required dependencies for Node.js:
|
||||
|
||||
```bash
|
||||
sudo apt install -y build-essential wget
|
||||
```
|
||||
|
||||
3. Navigate to the directory where you downloaded the Node.js binary. In your case, it's the `~/Downloads` directory.
|
||||
|
||||
```bash
|
||||
cd ~/Downloads
|
||||
```
|
||||
|
||||
4. Extract the downloaded Node.js binary:
|
||||
|
||||
```bash
|
||||
sudo tar -xvf node-v20.14.0-linux-x64.tar.xz
|
||||
```
|
||||
|
||||
This will create a new directory named `node-v20.14.0-linux-x64`.
|
||||
|
||||
5. Move the extracted directory to a more appropriate location, such as `/usr/local/lib`:
|
||||
|
||||
```bash
|
||||
sudo mv node-v20.14.0-linux-x64 /usr/local/lib/nodejs
|
||||
```
|
||||
|
||||
6. Create symbolic links for the `node` and `npm` executables:
|
||||
|
||||
```bash
|
||||
sudo ln -s /usr/local/lib/nodejs/bin/node /usr/local/bin/node
|
||||
sudo ln -s /usr/local/lib/nodejs/bin/npm /usr/local/bin/npm
|
||||
```
|
||||
|
||||
7. Verify the installation by checking the Node.js and npm versions:
|
||||
|
||||
```bash
|
||||
node -v
|
||||
npm -v
|
||||
```
|
||||
|
||||
You should see the installed versions printed in the terminal.
|
||||
|
||||
That's it! Node.js is now installed on your Debian 12 system. You can start using Node.js and npm for your JavaScript projects.
|
||||
|
||||
Note: This installation method uses the binary distribution of Node.js. Alternatively, you can also install Node.js using the Node Source repository, which provides an easier way to install and update Node.js. For instructions on that method, refer to the official Node.js documentation: https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions
|
||||
|
||||
Reference in New Issue
Block a user