{"id":15232,"date":"2024-04-07T13:34:25","date_gmt":"2024-04-07T10:04:25","guid":{"rendered":"https:\/\/www.itpiran.net\/blog\/?p=15232"},"modified":"2024-04-07T13:34:25","modified_gmt":"2024-04-07T10:04:25","slug":"how-to-install-and-use-the-yarn-package-manager-for-node-js","status":"publish","type":"post","link":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/","title":{"rendered":"How to install and use Yarn Package Manager for Node.js"},"content":{"rendered":"<h2 id=\"%d9%85%d9%82%d8%af%d9%85%d9%87\">Introduction<\/h2>\n<p>Yarn is a package manager for Node.js that focuses on speed, security, and stability. It was originally created to fix some issues with the popular package manager NPM. Although the two package managers have since converged in terms of functionality and features, Yarn remains popular, especially in the world of React development.<\/p>\n<p>Some of Yarn&#039;s unique features include:<\/p>\n<ul>\n<li>Storage mechanism in each project, which can greatly speed up subsequent installation and construction.<\/li>\n<li>Fixed and definitive installations that ensure the structure of installed libraries is always the same.<\/li>\n<li>Testing the aggregation of all packages to verify their integrity<\/li>\n<li>\u201cWorkspaces\u201d which facilitate the use of Yarn in a monorepo (multiple projects developed in a single source code repository).<\/li>\n<\/ul>\n<p>In this tutorial, you will install Yarn globally, add Yarn to a specific project, and learn some basic Yarn commands.<\/p>\n<h5 id=\"%d9%be%db%8c%d8%b4-%d9%86%db%8c%d8%a7%d8%b2%d9%87%d8%a7\">Prerequisites<\/h5>\n<p>Before you can install and use the Yarn Package Manager, you must have Node.js installed. To check if you already have Node.js installed, type the following command in your local command line terminal:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>node -v<\/code><\/pre>\n<\/div>\n<p>If you see a version number printed like v12.16.3, you have Node.js installed. If you encounter a command not found error (or similar), please install Node.js before continuing.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-1-%d9%86%d8%b5%d8%a8-%d8%ac%d9%87%d8%a7%d9%86%db%8c-yarn\">Step 1 \u2013 Global YARN Installation<\/h2>\n<p>Yarn has a unique way of installing and running itself in your JavaScript projects. First, you install yarn globally, then you use the global yarn command to install a specific local version of Yarn in your project directory. This is necessary to ensure that everyone working on a project (and all of the project&#039;s automated testing and deployment tools) are using the same version of Yarn, to avoid inconsistent behavior and results.<\/p>\n<p>The Yarn maintainers recommend installing Yarn globally using the NPM package manager, which is included by default in all Node.js installations. To do this, use the -g flag with npm install:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo npm install -g yarn<\/code><\/pre>\n<\/div>\n<p>After installing the package, the command <code>yarn<\/code> Ask it to print its version number. This will allow you to verify that it was installed correctly:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yarn --version<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\n1.22.11<\/code><\/pre>\n<\/div>\n<p>Now that you have installed the yarn command globally, you can use it to install Yarn in a specific JavaScript project.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-2-%d9%86%d8%b5%d8%a8-%d9%86%d8%ae-%d8%af%d8%b1-%d9%be%d8%b1%d9%88%da%98%d9%87-%d8%b4%d9%85%d8%a7\">Step 2 \u2013 Installing Yarn in Your Project<\/h2>\n<p>If you are using Yarn to work with an existing Yarn-based project, you can skip this step. The project should already be set up with a local version of Yarn and all the configuration files necessary to use it.<\/p>\n<p>If you are starting a new project for yourself, you will now want to configure a project-specific version of Yarn.<\/p>\n<p>First, go to your project directory:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cd ~\/my-project<\/code><\/pre>\n<\/div>\n<p>If you don&#039;t have a project directory, you can create a new folder with mkdir and then enter it:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>mkdir my-project\r\ncd my-project<\/code><\/pre>\n<\/div>\n<p>Now from the command <code>yarn set<\/code> To set the version of Berry use:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yarn set version berry<\/code><\/pre>\n<\/div>\n<p>This will download the current, developed version of Yarn \u2013 berry \u2013 and save it to a .yarn\/releases\/ directory in your project, and also set up a .yarnrc.yml configuration file:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\nResolving berry to a url...\r\nDownloading https:\/\/github.com\/yarnpkg\/berry\/raw\/master\/packages\/berry-cli\/bin\/berry.js...\r\nSaving it into \/home\/sammy\/my-project\/.yarn\/releases\/yarn-berry.cjs...\r\nUpdating \/home\/sammy\/my-project\/.yarnrc.yml...\r\nDone!\r\n<\/code><\/pre>\n<\/div>\n<p>Now try the yarn --version command again:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yarn --version<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\n3.0.0<\/code><\/pre>\n<\/div>\n<p>You will see that the version is 3.0.0 or higher. This is the latest version of Yarn.<\/p>\n<p>Your project is now set up with a project-specific version of Yarn. Next, we&#039;ll look at some commonly used Yarn commands to get you started.<\/p>\n<h5 id=\"%d8%a7%d8%b3%d8%aa%d9%81%d8%a7%d8%af%d9%87-%d8%a7%d8%b2-yarn\">Using Yarn<\/h5>\n<p>Yarn has a lot of subcommands, but you only need a few to get started. Let&#039;s look at the first subcommands you&#039;ll want to use.<\/p>\n<p>When getting started with any new tool, it&#039;s helpful to learn how to access its online help. In Yarn, you can add the --help flag to any command to get more information:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yarn --help<\/code><\/pre>\n<\/div>\n<p>This prints general help for the yarn command. To get more detailed information about a subcommand, add \u2013help after the subcommand:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yarn install --help<\/code><\/pre>\n<\/div>\n<p>This will print details about how to use the yarn installation command.<\/p>\n<h5 id=\"%d8%b4%d8%b1%d9%88%d8%b9-%db%8c%da%a9-%d9%be%d8%b1%d9%88%da%98%d9%87-%d8%ac%d8%af%db%8c%d8%af-yarn\">Starting a new YARN project<\/h5>\n<p>If you are starting a project from scratch, use the init subcommand to create the Yarn-specific files you need:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yarn init<\/code><\/pre>\n<\/div>\n<p>This will add a package.json configuration file and a yarn.lock file to your directory. package.json contains the configuration and list of dependencies for your module. The yarn.lock file locks those dependencies to specific versions, ensuring that the dependency tree is always consistent.<\/p>\n<h5 id=\"%d9%86%d8%b5%d8%a8-%d8%aa%d9%85%d8%a7%d9%85-%d9%88%d8%a7%d8%a8%d8%b3%d8%aa%da%af%db%8c-%d9%87%d8%a7%db%8c-%db%8c%da%a9-%d9%be%d8%b1%d9%88%da%98%d9%87\">Installing all dependencies for a project<\/h5>\n<p>To download and install all dependencies in an existing Yarn-based project, use the install subcommand:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yarn install<\/code><\/pre>\n<\/div>\n<p>This will download and install the modules you need to get started.<\/p>\n<h5 id=\"%d8%a7%d9%81%d8%b2%d9%88%d8%af%d9%86-%db%8c%da%a9-%d9%88%d8%a7%d8%a8%d8%b3%d8%aa%da%af%db%8c-%d8%ac%d8%af%db%8c%d8%af-%d8%a8%d9%87-%db%8c%da%a9-%d9%be%d8%b1%d9%88%da%98%d9%87\">Adding a new dependency to a project<\/h5>\n<p>Use the add subcommand to add new dependencies to the project:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>yarn add package-name<\/code><\/pre>\n<\/div>\n<p>This will download and install the module, and update your package.json and yarn.lock files.<\/p>\n<h5 id=\"%d8%af%d8%b1-%d8%ad%d8%a7%d9%84-%d8%a8%d9%87%d8%b1%d9%88%d8%b2%d8%b1%d8%b3%d8%a7%d9%86%db%8c-%d9%81%d8%a7%db%8c%d9%84-gitignore-%d8%a8%d8%b1%d8%a7%db%8c-yarn\">Updating file <code>.gitignore<\/code> For Yarn<\/h5>\n<p>Yarn stores files in a .yarn folder in your project directory. Some of these files should be checked into version control and others should be ignored. The basic .gitignore configuration for Yarn is as follows:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\">.yarn\/*\r\n!.yarn\/patches\r\n!.yarn\/releases\r\n!.yarn\/plugins\r\n!.yarn\/sdks\r\n!.yarn\/versions\r\n.pnp.*<\/pre>\n<\/div>\n<p>This will ignore the entire yarn. directory and then add some exceptions for important folders, including the releases directory which contains your project-specific version of Yarn.<\/p>\n<p>For more details on how to configure Git and Yarn, please refer to the official Yarn documentation on .gitignore.<\/p>\n<h2 id=\"%d9%86%d8%aa%db%8c%d8%ac%d9%87\">Result<\/h2>\n<p>In this tutorial, you installed Yarn and were introduced to a few yarn subcommands. For more information on using Yarn, take a look at the official Yarn CLI documentation.<\/p>","protected":false},"excerpt":{"rendered":"Introduction Yarn is a package manager for Node.js that focuses on speed, security, and stability. Initially\u2026","protected":false},"author":1,"featured_media":15234,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Yarn Package Manager \u0628\u0631\u0627\u06cc Node.js","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_canonical":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_opengraph-image":"","_yoast_wpseo_twitter-description":"","_yoast_wpseo_twitter-image":"","_yoast_wpseo_focuskeywords":"","_yoast_wpseo_primary_category":"193","footnotes":""},"categories":[193,363],"tags":[384,394],"class_list":{"0":"post-15232","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorials","8":"category-programming","9":"tag-java-script","10":"tag-nodejs"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Yarn Package Manager \u0628\u0631\u0627\u06cc Node.js - \u0628\u0644\u0627\u06af ITPiran<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Yarn Package Manager \u0628\u0631\u0627\u06cc Node.js - \u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"og:description\" content=\"\u0645\u0642\u062f\u0645\u0647 Yarn \u06cc\u06a9 \u0645\u062f\u06cc\u0631\u06cc\u062a \u0628\u0633\u062a\u0647 \u0628\u0631\u0627\u06cc Node.js \u0627\u0633\u062a \u06a9\u0647 \u0628\u0631 \u0633\u0631\u0639\u062a\u060c \u0627\u0645\u0646\u06cc\u062a \u0648 \u062b\u0628\u0627\u062a \u062a\u0645\u0631\u06a9\u0632 \u062f\u0627\u0631\u062f. \u062f\u0631 \u0627\u0628\u062a\u062f\u0627&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-07T10:04:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.itpiran.net\/2024\/04\/07133322\/Node.yarn_.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1793\" \/>\n\t<meta property=\"og:image:height\" content=\"1110\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\"},\"headline\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Yarn Package Manager \u0628\u0631\u0627\u06cc Node.js\",\"datePublished\":\"2024-04-07T10:04:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/\"},\"wordCount\":107,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/07133322\\\/Node.yarn_.jpg\",\"keywords\":[\"Java Script\",\"Nodejs\"],\"articleSection\":[\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/\",\"name\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Yarn Package Manager \u0628\u0631\u0627\u06cc Node.js - \u0628\u0644\u0627\u06af ITPiran\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/07133322\\\/Node.yarn_.jpg\",\"datePublished\":\"2024-04-07T10:04:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/07133322\\\/Node.yarn_.jpg\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/07133322\\\/Node.yarn_.jpg\",\"width\":1793,\"height\":1110},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-and-use-the-yarn-package-manager-for-node-js\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/category\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Yarn Package Manager \u0628\u0631\u0627\u06cc Node.js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"name\":\"\u0628\u0644\u0627\u06af ITPiran\",\"description\":\"\u0627\u062e\u0628\u0627\u0631 \u0648 \u0645\u0642\u0627\u0644\u0627\u062a \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\",\"name\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"alternateName\":\"ITPIran Blog\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"width\":512,\"height\":512,\"caption\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\",\"name\":\"admin\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/en\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install and Use Yarn Package Manager for Node.js - ITPiran Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/","og_locale":"en_US","og_type":"article","og_title":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Yarn Package Manager \u0628\u0631\u0627\u06cc Node.js - \u0628\u0644\u0627\u06af ITPiran","og_description":"\u0645\u0642\u062f\u0645\u0647 Yarn \u06cc\u06a9 \u0645\u062f\u06cc\u0631\u06cc\u062a \u0628\u0633\u062a\u0647 \u0628\u0631\u0627\u06cc Node.js \u0627\u0633\u062a \u06a9\u0647 \u0628\u0631 \u0633\u0631\u0639\u062a\u060c \u0627\u0645\u0646\u06cc\u062a \u0648 \u062b\u0628\u0627\u062a \u062a\u0645\u0631\u06a9\u0632 \u062f\u0627\u0631\u062f. \u062f\u0631 \u0627\u0628\u062a\u062f\u0627&hellip;","og_url":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/","og_site_name":"\u0628\u0644\u0627\u06af ITPiran","article_published_time":"2024-04-07T10:04:25+00:00","og_image":[{"width":1793,"height":1110,"url":"https:\/\/cdn.itpiran.net\/2024\/04\/07133322\/Node.yarn_.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/#article","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/"},"author":{"name":"admin","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81"},"headline":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Yarn Package Manager \u0628\u0631\u0627\u06cc Node.js","datePublished":"2024-04-07T10:04:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/"},"wordCount":107,"commentCount":0,"publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/04\/07133322\/Node.yarn_.jpg","keywords":["Java Script","Nodejs"],"articleSection":["\u0622\u0645\u0648\u0632\u0634\u06cc","\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/","url":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/","name":"How to Install and Use Yarn Package Manager for Node.js - ITPiran Blog","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/#primaryimage"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/04\/07133322\/Node.yarn_.jpg","datePublished":"2024-04-07T10:04:25+00:00","breadcrumb":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/#primaryimage","url":"https:\/\/cdn.itpiran.net\/2024\/04\/07133322\/Node.yarn_.jpg","contentUrl":"https:\/\/cdn.itpiran.net\/2024\/04\/07133322\/Node.yarn_.jpg","width":1793,"height":1110},{"@type":"BreadcrumbList","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-and-use-the-yarn-package-manager-for-node-js\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.itpiran.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0622\u0645\u0648\u0632\u0634\u06cc","item":"https:\/\/www.itpiran.net\/blog\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Yarn Package Manager \u0628\u0631\u0627\u06cc Node.js"}]},{"@type":"WebSite","@id":"https:\/\/www.itpiran.net\/blog\/#website","url":"https:\/\/www.itpiran.net\/blog\/","name":"ITPiran Blog","description":"Iranian Sustainable Trade News and Articles","publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.itpiran.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.itpiran.net\/blog\/#organization","name":"Sustainable Iranian Business Blog","alternateName":"ITPIran Blog","url":"https:\/\/www.itpiran.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","contentUrl":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","width":512,"height":512,"caption":"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81","name":"admin","url":"https:\/\/www.itpiran.net\/blog\/en\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/comments?post=15232"}],"version-history":[{"count":1,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15232\/revisions"}],"predecessor-version":[{"id":15233,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15232\/revisions\/15233"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media\/15234"}],"wp:attachment":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media?parent=15232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/categories?post=15232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/tags?post=15232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}