{"id":41966,"date":"2024-08-23T11:22:42","date_gmt":"2024-08-23T11:22:42","guid":{"rendered":"https:\/\/www.carmatec.com\/?p=41966"},"modified":"2024-08-23T11:22:42","modified_gmt":"2024-08-23T11:22:42","slug":"come-installare-node-js-e-npm-su-windows-macos-linux","status":"publish","type":"post","link":"https:\/\/stage.carmatec.com\/it_it\/blog\/come-installare-node-js-e-npm-su-windows-macos-linux\/","title":{"rendered":"Come installare Node.js e npm su Windows, macOS e Linux"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"41966\" class=\"elementor elementor-41966\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ee111f0 e-flex e-con-boxed e-con e-parent\" data-id=\"ee111f0\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5ffcd61 elementor-widget elementor-widget-text-editor\" data-id=\"5ffcd61\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2><b>introduzione<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Node.js \u00e8 un potente ambiente di runtime JavaScript che consente di eseguire codice JavaScript sul lato server. npm (Node Package Manager) \u00e8 il gestore di pacchetti predefinito per Node.js ed \u00e8 essenziale per gestire i pacchetti JavaScript e le dipendenze. In questa guida vi illustreremo i passaggi per installare Node.js e npm su Windows, macOS e Linux.<\/span><\/p>\n<h2><b>1. Installazione di Node.js e npm su Windows<\/b><\/h2>\n<p><b>Passo 1: Scaricare Node.js<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Visita il sito<\/span><a href=\"https:\/\/nodejs.org\/\"> <span style=\"font-weight: 400;\">Sito ufficiale di Node.js<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Scaricare il programma di installazione di Windows (.msi) per la versione LTS (Long Term Support).<br><br><\/span><\/li>\n<\/ol>\n<p><b>Passo 2: installare Node.js<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Eseguire il programma scaricato <\/span><span style=\"font-weight: 400;\">.msi<\/span><span style=\"font-weight: 400;\"> file.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Seguite le richieste di installazione, assicurandovi di selezionare la casella per includere <\/span><span style=\"font-weight: 400;\">npm<\/span><span style=\"font-weight: 400;\"> nell'installazione.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Fare clic su \"Avanti\" e \"Installa\" per completare l'installazione.<br><br><\/span><\/li>\n<\/ol>\n<p><b>Fase 3: Verifica dell'installazione<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Aprire il Prompt dei comandi.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Tipo <\/span><span style=\"font-weight: 400;\">nodo -v<\/span><span style=\"font-weight: 400;\"> per verificare la versione di Node.js.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Tipo <\/span><span style=\"font-weight: 400;\">npm -v<\/span><span style=\"font-weight: 400;\"> per verificare la versione di npm.<br><br><\/span><\/li>\n<\/ol>\n<h2><b>2. Installazione di Node.js e npm su macOS<\/b><\/h2>\n<p><b>Passo 1: installare Node.js tramite Homebrew<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Terminale aperto.<br><br><\/span><\/li>\n<\/ol>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Installare<\/span><a href=\"https:\/\/brew.sh\/\"> <span style=\"font-weight: 400;\">Homebrew<\/span><\/a><span style=\"font-weight: 400;\"> se non l'avete gi\u00e0 fatto, correndo:<\/span><\/li>\n<\/ol>\n<div>\n<pre>    \/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"<\/pre>\n<\/div>\n<p><span style=\"font-weight: 400;\">&nbsp; &nbsp; 3.Installare Node.js e npm con:<\/span><span style=\"font-weight: 400;\"><br><\/span><\/p>\n<pre><span style=\"font-weight: 400;\">      brew installare node<\/span><\/pre>\n<p><\/p>\n<p><b>Fase 2: Verifica dell'installazione<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Nel Terminale, digitare <\/span><span style=\"font-weight: 400;\">nodo -v<\/span><span style=\"font-weight: 400;\"> per verificare la versione di Node.js.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Tipo <\/span><span style=\"font-weight: 400;\">npm -v<\/span><span style=\"font-weight: 400;\"> per verificare la versione di npm.<br><br><\/span><\/li>\n<\/ol>\n<p><b>Metodo alternativo: Scaricare dal sito web<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Visita il sito<\/span><a href=\"https:\/\/nodejs.org\/\"> <span style=\"font-weight: 400;\">Sito ufficiale di Node.js<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Scaricare il programma di installazione di macOS ed eseguire il file <\/span><span style=\"font-weight: 400;\">.pkg<\/span><span style=\"font-weight: 400;\"> file.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Seguire le indicazioni per completare l'installazione.<\/span><\/li>\n<\/ol>\n<h2><b>3. Installazione di Node.js e npm su Linux<\/b><\/h2>\n<p><b>Passo 1: Aggiornare l'indice dei pacchetti<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Terminale aperto.<br><br><\/span><\/li>\n<\/ol>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Eseguite il seguente comando per aggiornare l'indice del pacchetto:<\/span><span style=\"font-weight: 400;\"><br><\/span><span style=\"font-weight: 400;\">sudo apt update<br><br><\/span><\/li>\n<\/ol>\n<p><b>Passo 2: Installare Node.js e npm<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Per le distribuzioni basate su Debian\/Ubuntu<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"><br><\/span><span style=\"font-weight: 400;\">sudo apt install nodejs npm<br><br><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Per le distribuzioni basate su CentOS\/RHEL<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"><br><\/span><span style=\"font-weight: 400;\">sudo yum installare nodejs npm<br><br><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Per Fedora<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"><br><\/span><span style=\"font-weight: 400;\">sudo dnf installare nodejs npm<br><br><\/span><\/li>\n<\/ul>\n<p><b>Fase 3: Verifica dell'installazione<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Nel Terminale, digitare <\/span><span style=\"font-weight: 400;\">nodo -v<\/span><span style=\"font-weight: 400;\"> per verificare la versione di Node.js.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Tipo <\/span><span style=\"font-weight: 400;\">npm -v<\/span><span style=\"font-weight: 400;\"> per verificare la versione di npm.<br><br><\/span><\/li>\n<\/ol>\n<h2><b>Metodo alternativo: Installazione tramite Node Version Manager (nvm)<\/b><\/h2>\n<ol>\n<li><span style=\"font-weight: 400;\"> Installare <\/span><span style=\"font-weight: 400;\">nvm<\/span><span style=\"font-weight: 400;\"> (Node Version Manager) eseguendo:<\/span><\/li>\n<\/ol>\n<pre><span style=\"text-align: var(--text-align);\"><font face=\"monospace, monospace\">    <\/font>curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.2\/install.sh | bash<\/span><\/pre>\n<ol start=\"2\" style=\"font-size: 17px; background-color: rgb(255, 255, 255);\">\n<li><span style=\"font-weight: 400;\">Carico <\/span><span style=\"font-weight: 400;\">nvm<\/span><span style=\"font-weight: 400;\">:<\/span><\/li>\n<\/ol>\n<pre>    sorgente ~\/.bashrc<\/pre>\n<ol start=\"3\">\n<li><span style=\"font-weight: 400;\">Installare Node.js utilizzando <\/span><span style=\"font-weight: 400;\">nvm<\/span><span style=\"font-weight: 400;\">:<\/span><\/li>\n<\/ol>\n<pre>    nvm installare il nodo<\/pre>\n<ol start=\"3\">\n<li><span style=\"font-weight: 400;\"> Verificate digitando <\/span><span style=\"font-weight: 400;\">nodo -v<\/span><span style=\"font-weight: 400;\"> E <\/span><span style=\"font-weight: 400;\">npm -v<\/span><span style=\"font-weight: 400;\">.<br><br><\/span><\/li>\n<\/ol>\n<h2><b>Conclusione<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">L'installazione di Node.js e npm \u00e8 semplice, sia che si utilizzi Windows, macOS o Linux. Seguendo questa guida, Node.js e npm saranno operativi in pochissimo tempo, pronti per i vostri progetti di sviluppo. Con <a href=\"https:\/\/www.carmatec.com\/hire-developers\/hire-nodejs-developer\/\">Node.js<\/a> installato, si \u00e8 pronti per esplorare il mondo del server-side <a href=\"https:\/\/www.carmatec.com\/hire-developers\/hire-javascript-developer\/\">JavaScript<\/a> e iniziare a costruire potenti <a href=\"https:\/\/www.carmatec.com\/web-application-development\/\">applicazioni<\/a>.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Introduction Node.js is a powerful JavaScript runtime environment that enables you to run JavaScript code on the server side. npm (Node Package Manager) is the default package manager for Node.js and is essential for managing JavaScript packages and dependencies. In this guide, we&#8217;ll walk you through the steps to install Node.js and npm on Windows, [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":41972,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-41966","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/posts\/41966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/comments?post=41966"}],"version-history":[{"count":6,"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/posts\/41966\/revisions"}],"predecessor-version":[{"id":41973,"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/posts\/41966\/revisions\/41973"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/media\/41972"}],"wp:attachment":[{"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/media?parent=41966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/categories?post=41966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stage.carmatec.com\/it_it\/wp-json\/wp\/v2\/tags?post=41966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}