{"id":15776,"date":"2024-06-27T19:23:42","date_gmt":"2024-06-27T15:53:42","guid":{"rendered":"https:\/\/www.itpiran.net\/blog\/?p=15776"},"modified":"2024-06-27T19:23:42","modified_gmt":"2024-06-27T15:53:42","slug":"how-to-install-node-js-and-create-a-local-development-environment-on-macos","status":"publish","type":"post","link":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/","title":{"rendered":"How to install Node.js and create a local development environment on macOS"},"content":{"rendered":"<h2 id=\"%d9%85%d9%82%d8%af%d9%85%d9%87\">Introduction<\/h2>\n<p>Node.js is an open source JavaScript runtime environment for easily building server-side applications. It is also the runtime that powers many client-side development tools for modern JavaScript frameworks.<\/p>\n<p>In this tutorial, you will set up a Node.js development environment on your local macOS machine using Homebrew and test your environment by writing a simple Node.js application.<\/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>You need a macOS computer with High Sierra or higher with administrative access and an internet connection.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-1-%d8%a7%d8%b3%d8%aa%d9%81%d8%a7%d8%af%d9%87-%d8%a7%d8%b2-%d8%aa%d8%b1%d9%85%db%8c%d9%86%d8%a7%d9%84-macos\">Step 1 \u2013 Using the macOS Terminal<\/h2>\n<p>You will use the command line to install Node.js and run various commands related to developing Node.js applications. The command line is a non-graphical way to interact with your computer. Instead of clicking buttons with a mouse, you type commands as text and receive text-based feedback. The command line, also known as a shell, allows you to automate many of the tasks you perform on your computer every day and is an essential tool for software developers.<\/p>\n<p>To access the command line interface, you&#039;ll use the Terminal app provided by macOS. Like any other app, you can find it by going to the Finder, navigating to the Applications folder, and then to the Utilities folder. From here, double-click the Terminal app to open it. You can also use Spotlight by holding down the COMMAND key and pressing SPACE to find Terminal by typing it into the box that appears.<\/p>\n<p><img  loading=\"lazy\"  decoding=\"async\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  width=\"1176\"  height=\"770\"  class=\"aligncenter wp-image-15777 size-full pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"auto, (max-width: 1176px) 100vw, 1176px\"  data-pk-src=\"https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8.png\"  data-pk-srcset=\"https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8.png 1176w, https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8-300x196.png 300w, https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8-1024x670.png 1024w, https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8-768x503.png 768w, https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8-110x72.png 110w, https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8-200x131.png 200w, https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8-380x249.png 380w, https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8-255x167.png 255w, https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8-550x360.png 550w, https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8-800x524.png 800w, https:\/\/cdn.itpiran.net\/2024\/06\/27190311\/1-8-1160x760.png 1160w\" ><\/p>\n<p>Now that the terminal is running, let&#039;s install some of the prerequisites needed for Node.js.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-2-%d9%86%d8%b5%d8%a8-%d8%a7%d8%a8%d8%b2%d8%a7%d8%b1%d9%87%d8%a7%db%8c-%d8%ae%d8%b7-%d9%81%d8%b1%d9%85%d8%a7%d9%86-xcode\">Step 2 \u2013 Install Xcode Command Line Tools<\/h2>\n<p>Xcode is an integrated development environment (IDE) that consists of software development tools for macOS. You don&#039;t need Xcode to write Node.js applications, but Node.js and some of its components rely on the Xcode Command Line Tools package.<\/p>\n<p>To download and install these components, run this command in the 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>xcode-select --install<\/code><\/pre>\n<\/div>\n<p>You will be prompted to start the installation and then again asked to accept the software license. The tools will then be downloaded and installed automatically.<\/p>\n<p>We are now ready to install the Homebrew package manager, which will allow us to install the latest version of Node.js.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-3-%d9%86%d8%b5%d8%a8-%d9%88-%d8%b1%d8%a7%d9%87-%d8%a7%d9%86%d8%af%d8%a7%d8%b2%db%8c-homebrew\">Step 3 \u2013 Installing and Setting Up Homebrew<\/h2>\n<p>While the command line interface on macOS has many of the same features you&#039;ll find on Linux and other Unix-like systems, it doesn&#039;t come with a good package manager. A package manager is a collection of software tools that work to automate the installation, configuration, and upgrade of software. They keep the software you install in a central location and can maintain all the software packages on your system in commonly used formats. Homebrew is a free and open source package management system that simplifies installing software on macOS. We&#039;ll use Homebrew to install the latest version of Node.js.<\/p>\n<p>To install Homebrew, type this command in your terminal window:<\/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>\/usr\/bin\/ruby -e \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)\"<\/code><\/pre>\n<\/div>\n<p>This command uses curl to download the Homebrew installation script from Homebrew&#039;s Git repository on GitHub.<\/p>\n<p>Let&#039;s go through the flags associated with the curl command:<\/p>\n<ul>\n<li>The -f or \u2013fail flag tells the terminal window not to provide any HTML document output on server errors.<\/li>\n<li>The -s or --silent flag silences curl so that it does not show the progress meter, and combined with the -S or --show-error flag ensures that curl displays an error message if it fails.<\/li>\n<li>The -L or --location flag tells curl to handle redirects. If the server reports that the requested page has moved to a different location, it will automatically re-execute the request using the new location.<\/li>\n<\/ul>\n<p>Once curl downloads the script, it is then executed by the Ruby interpreter that ships with macOS, starting the Homebrew installation process.<\/p>\n<p>The installation script will explain what it will do and ask you to confirm that you want to do it. This will give you a chance to see exactly what Homebrew is going to do to your system before you allow it to do it. It will also ensure that you have the necessary prerequisites before you proceed.<\/p>\n<p>You will be prompted to enter your password during the process. However, your keystrokes will not be displayed in the Terminal window when you type your password. This is a security measure and is something you will often see when prompted for a password on the command line. Even though you don&#039;t see them, your keystrokes are being recorded by the system, so press the RETURN key after you enter your password.<\/p>\n<p>Whenever you are asked to confirm the installation, press the letter y for \u201cyes.\u201d.<\/p>\n<p>Now let&#039;s check that Homebrew is set up correctly. Run this command:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>brew doctor<\/code><\/pre>\n<\/div>\n<\/div>\n<p>If no update is needed at this time, you will see this in your terminal:<\/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\nYour system is ready to brew.<\/code><\/pre>\n<\/div>\n<p>Otherwise, you may receive a warning to run another command, such as brew update, to ensure your Homebrew installation is up to date.<\/p>\n<p>Now that Homebrew is installed, you can install Node.js.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-4-%d9%86%d8%b5%d8%a8-node-js\">Step 4 \u2013 Install Node.js<\/h2>\n<p>By installing Homebrew, you can install a wide range of software and developer tools. We will use it to install Node.js and its dependencies.<\/p>\n<p>You can use Homebrew to search for everything you can install with the brew search command, but to give us a shorter list, let&#039;s search for Node.js-related packages instead:<\/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>brew search nodejs<\/code><\/pre>\n<\/div>\n<p>You will see a list of packages you can install, like this:<\/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\n==&gt; Formulae\r\nnode.js\r\nnodejs<\/code><\/pre>\n<\/div>\n<p>Both of these packages install Node.js on your system. Both of them are there just in case you can&#039;t remember whether you need to use nodejs or node.js.<\/p>\n<p>To install the nodejs package, run this command:<\/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>brew install nodejs<\/code><\/pre>\n<\/div>\n<p>You will see output similar to the following in your terminal. Homebrew will install many dependencies, but will ultimately download and install Node.js itself:<\/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\n==&gt; Installing dependencies for node: icu4c\r\n==&gt; Installing node dependency: icu4c\r\n==&gt; Installing node\r\n==&gt; Downloading https:\/\/homebrew.bintray.com\/bottles\/node-11.0.0.sierra.bottle.tar.gz\r\n######################################################################## 100.0%\r\n==&gt; Pouring node-11.0.0.sierra.bottle.tar.gz\r\n...\r\n==&gt; Summary\r\n\ud83c\udf7a \/usr\/local\/Cellar\/node\/11.0.0: 3,936 files, 50.1MB<\/code><\/pre>\n<\/div>\n<p>In addition to Node.js itself, Homebrew installs a few related tools, including npm, which makes it easy to install and update Node.js libraries and packages that you might use in your projects.<\/p>\n<p>To check the version of Node.js you have installed, type<\/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>This will output the specific version of Node.js that is currently installed, which by default is the most up-to-date stable version of Node.js available.<\/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\nv11.0.0<\/code><\/pre>\n<\/div>\n<p>Check the npm version:<\/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>npm -v<\/code><\/pre>\n<\/div>\n<p>You will see the displayed version:<\/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\n6.4.1<\/code><\/pre>\n<\/div>\n<p>You will use npm to install additional components, libraries, and frameworks.<\/p>\n<p>To update your Node.js version, you can first update Homebrew to get the latest package list and then upgrade Node.js itself:<\/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>brew update\r\nbrew upgrade nodejs<\/code><\/pre>\n<\/div>\n<p>Now that Node.js is installed, let&#039;s write a program to make sure everything works.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-5-%d8%a7%db%8c%d8%ac%d8%a7%d8%af-%db%8c%da%a9-%d8%a8%d8%b1%d9%86%d8%a7%d9%85%d9%87-%d8%b3%d8%a7%d8%af%d9%87\">Step 5 \u2013 Create a simple app<\/h2>\n<p>Let&#039;s create a simple &quot;Hello, World&quot; application. This will ensure that our environment is working and get you comfortable with creating and running a Node.js application.<\/p>\n<p>To do this, create a new file called hello.js using nano:<\/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>nano hello.js<\/code><\/pre>\n<\/div>\n<p>Type the following code into the file:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>let message = \"Hello, World!\";\r\nconsole.log(message);<\/code><\/pre>\n<\/div>\n<p>Exit the editor by pressing CTRL+X. Then press y when prompted to save the file. You will be returned to your request.<\/p>\n<p>Now run the program with the following command:<\/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 hello.js<\/code><\/pre>\n<\/div>\n<p>The program runs and displays its output on the screen:<\/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\nHello, World!<\/code><\/pre>\n<\/div>\n<p>This simple program proves that you have a working development environment. You can use this environment to continue exploring Node.js and building bigger and more interesting projects.<\/p>\n<h2 id=\"%d9%86%d8%aa%db%8c%d8%ac%d9%87\">Result<\/h2>\n<p>You have successfully installed Node.js, npm and tested your setup by creating and running a simple application. You can now use this to develop client-side applications or server-side applications.<\/p>","protected":false},"excerpt":{"rendered":"Introduction Node.js is an open source JavaScript runtime environment for easily building server-side applications.\u2026","protected":false},"author":1,"featured_media":15779,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u0648 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u0645\u062d\u0644\u06cc \u062f\u0631 macOS","_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":[427,432,394],"class_list":{"0":"post-15776","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorials","8":"category-programming","9":"tag-development","10":"tag-macos","11":"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 Node.js \u0648 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u0645\u062d\u0644\u06cc \u062f\u0631 macOS - \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-node-js-and-create-a-local-development-environment-on-macos\/\" \/>\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 Node.js \u0648 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u0645\u062d\u0644\u06cc \u062f\u0631 macOS - \u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"og:description\" content=\"\u0645\u0642\u062f\u0645\u0647 Node.js \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0645\u0646\u0628\u0639 \u0628\u0627\u0632 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0622\u0633\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u0633\u0645\u062a \u0633\u0631\u0648\u0631 \u0627\u0633\u062a.&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-27T15:53:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.itpiran.net\/2024\/06\/27192224\/111.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-node-js-and-create-a-local-development-environment-on-macos\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\"},\"headline\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u0648 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u0645\u062d\u0644\u06cc \u062f\u0631 macOS\",\"datePublished\":\"2024-06-27T15:53:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/\"},\"wordCount\":142,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/06\\\/27192224\\\/111.jpg\",\"keywords\":[\"development\",\"macOS\",\"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-node-js-and-create-a-local-development-environment-on-macos\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/\",\"name\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u0648 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u0645\u062d\u0644\u06cc \u062f\u0631 macOS - \u0628\u0644\u0627\u06af ITPiran\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/06\\\/27192224\\\/111.jpg\",\"datePublished\":\"2024-06-27T15:53:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/06\\\/27192224\\\/111.jpg\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/06\\\/27192224\\\/111.jpg\",\"width\":1793,\"height\":1110},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\\\/#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 Node.js \u0648 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u0645\u062d\u0644\u06cc \u062f\u0631 macOS\"}]},{\"@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 Node.js and create a local development environment on macOS - 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-node-js-and-create-a-local-development-environment-on-macos\/","og_locale":"en_US","og_type":"article","og_title":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u0648 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u0645\u062d\u0644\u06cc \u062f\u0631 macOS - \u0628\u0644\u0627\u06af ITPiran","og_description":"\u0645\u0642\u062f\u0645\u0647 Node.js \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0645\u0646\u0628\u0639 \u0628\u0627\u0632 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0622\u0633\u0627\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u0633\u0645\u062a \u0633\u0631\u0648\u0631 \u0627\u0633\u062a.&hellip;","og_url":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/","og_site_name":"\u0628\u0644\u0627\u06af ITPiran","article_published_time":"2024-06-27T15:53:42+00:00","og_image":[{"width":1793,"height":1110,"url":"https:\/\/cdn.itpiran.net\/2024\/06\/27192224\/111.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-node-js-and-create-a-local-development-environment-on-macos\/#article","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/"},"author":{"name":"admin","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81"},"headline":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u0648 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u0645\u062d\u0644\u06cc \u062f\u0631 macOS","datePublished":"2024-06-27T15:53:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/"},"wordCount":142,"commentCount":0,"publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/06\/27192224\/111.jpg","keywords":["development","macOS","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-node-js-and-create-a-local-development-environment-on-macos\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/","url":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/","name":"How to install Node.js and create a local development environment on macOS - ITPiran Blog","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/#primaryimage"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/06\/27192224\/111.jpg","datePublished":"2024-06-27T15:53:42+00:00","breadcrumb":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/#primaryimage","url":"https:\/\/cdn.itpiran.net\/2024\/06\/27192224\/111.jpg","contentUrl":"https:\/\/cdn.itpiran.net\/2024\/06\/27192224\/111.jpg","width":1793,"height":1110},{"@type":"BreadcrumbList","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-and-create-a-local-development-environment-on-macos\/#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 Node.js \u0648 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u0645\u062d\u0644\u06cc \u062f\u0631 macOS"}]},{"@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\/15776","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=15776"}],"version-history":[{"count":2,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15776\/revisions"}],"predecessor-version":[{"id":15780,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15776\/revisions\/15780"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media\/15779"}],"wp:attachment":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media?parent=15776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/categories?post=15776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/tags?post=15776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}