updated javascript-yarn

This commit is contained in:
Whisker Jones
2024-05-28 13:20:19 -06:00
parent bdb9190698
commit 77eabe99e8

View File

@@ -152,3 +152,44 @@ 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. 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 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
---
Sure, here's step 8 to install and verify Yarn on your Debian 12 system:
8. Install and verify Yarn:
```bash
# Step 8a: Install Yarn
sudo npm install --global yarn
# Step 8b: Verify Yarn installation
yarn --version
```
After executing `sudo npm install --global yarn`, Yarn will be installed globally on your system. The `--global` flag ensures that Yarn is installed system-wide and available in your `PATH`.
Once the installation is complete, you can verify the installed version of Yarn by running `yarn --version`. This should print the version of Yarn that was installed.
```
$ yarn --version
1.22.19
```
If you see the version number printed, it means Yarn was successfully installed and is ready to use.
You can now use Yarn to manage your JavaScript projects, install packages, and run scripts. For example, to create a new project and initialize the `package.json` file, you can run:
```bash
yarn init
```
And to install a package, you can run:
```bash
yarn add package-name
```
Yarn provides a similar set of commands to npm, but with additional features like faster installation times, better dependency management, and reproducible builds.
With both Node.js and Yarn installed, you have a powerful setup for developing JavaScript applications, including modern frameworks like React, Angular, Vue.js, or static site generators like Gatsby.