{"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":"como-instalar-node-js-y-npm-en-windows-macos-linux","status":"publish","type":"post","link":"https:\/\/stage.carmatec.com\/es\/blog\/como-instalar-node-js-y-npm-en-windows-macos-linux\/","title":{"rendered":"C\u00f3mo instalar Node.js y npm en Windows, macOS y 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>Introducci\u00f3n<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Node.js es un potente entorno de ejecuci\u00f3n de JavaScript que te permite ejecutar c\u00f3digo JavaScript en el lado del servidor. npm (Node Package Manager) es el gestor de paquetes predeterminado para Node.js y es esencial para gestionar paquetes y dependencias de JavaScript. En esta gu\u00eda, te guiaremos a trav\u00e9s de los pasos para instalar Node.js y npm en Windows, macOS y Linux.<\/span><\/p>\n<h2><b>1. Instalaci\u00f3n de Node.js y npm en Windows<\/b><\/h2>\n<p><b>Paso 1: Descargar Node.js<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Visite el<\/span><a href=\"https:\/\/nodejs.org\/\"> <span style=\"font-weight: 400;\">Sitio web oficial de 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;\">Descargue el instalador de Windows (.msi) para la versi\u00f3n LTS (Long Term Support).<br><br><\/span><\/li>\n<\/ol>\n<p><b>Paso 2: Instalar Node.js<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ejecute el programa descargado <\/span><span style=\"font-weight: 400;\">.msi<\/span><span style=\"font-weight: 400;\"> archivo.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Siga las instrucciones de instalaci\u00f3n, asegur\u00e1ndose de marcar la casilla para incluir <\/span><span style=\"font-weight: 400;\">npm<\/span><span style=\"font-weight: 400;\"> en la instalaci\u00f3n.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Haga clic en \"Siguiente\" e \"Instalar\" para completar la instalaci\u00f3n.<br><br><\/span><\/li>\n<\/ol>\n<p><b>Paso 3: Verificar la instalaci\u00f3n<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Abra el s\u00edmbolo del sistema.<\/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;\"> para comprobar la versi\u00f3n de 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;\"> para comprobar la versi\u00f3n de npm.<br><br><\/span><\/li>\n<\/ol>\n<h2><b>2. Instalaci\u00f3n de Node.js y npm en macOS<\/b><\/h2>\n<p><b>Paso 1: Instalar Node.js a trav\u00e9s de Homebrew<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Terminal abierto.<br><br><\/span><\/li>\n<\/ol>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Instale<\/span><a href=\"https:\/\/brew.sh\/\"> <span style=\"font-weight: 400;\">Elaboraci\u00f3n casera<\/span><\/a><span style=\"font-weight: 400;\"> si a\u00fan no lo has hecho corriendo:<\/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.Instalar Node.js y npm con:<\/span><span style=\"font-weight: 400;\"><br><\/span><\/p>\n<pre><span style=\"font-weight: 400;\">      brew install nodo<\/span><\/pre>\n<p><\/p>\n<p><b>Paso 2: Verificar la instalaci\u00f3n<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">En Terminal, escriba <\/span><span style=\"font-weight: 400;\">nodo -v<\/span><span style=\"font-weight: 400;\"> para comprobar la versi\u00f3n de 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;\"> para comprobar la versi\u00f3n de npm.<br><br><\/span><\/li>\n<\/ol>\n<p><b>M\u00e9todo alternativo: Descargar desde el sitio web<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Visite el<\/span><a href=\"https:\/\/nodejs.org\/\"> <span style=\"font-weight: 400;\">Sitio web oficial de 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;\">Descargue el instalador de macOS y ejecute <\/span><span style=\"font-weight: 400;\">.pkg<\/span><span style=\"font-weight: 400;\"> archivo.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Siga las instrucciones para completar la instalaci\u00f3n.<\/span><\/li>\n<\/ol>\n<h2><b>3. Instalaci\u00f3n de Node.js y npm en Linux<\/b><\/h2>\n<p><b>Paso 1: Actualizar el \u00edndice de paquetes<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Terminal abierto.<br><br><\/span><\/li>\n<\/ol>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Ejecute el siguiente comando para actualizar el \u00edndice de paquetes:<\/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>Paso 2: Instalar Node.js y npm<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Para distribuciones basadas en 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>Para las distribuciones basadas en CentOS\/RHEL<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"><br><\/span><span style=\"font-weight: 400;\">sudo yum install nodejs npm<br><br><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Para Fedora<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"><br><\/span><span style=\"font-weight: 400;\">sudo dnf install nodejs npm<br><br><\/span><\/li>\n<\/ul>\n<p><b>Paso 3: Verificar la instalaci\u00f3n<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">En Terminal, escriba <\/span><span style=\"font-weight: 400;\">nodo -v<\/span><span style=\"font-weight: 400;\"> para comprobar la versi\u00f3n de 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;\"> para comprobar la versi\u00f3n de npm.<br><br><\/span><\/li>\n<\/ol>\n<h2><b>M\u00e9todo alternativo: Instalaci\u00f3n a trav\u00e9s del Gestor de versiones de nodos (nvm)<\/b><\/h2>\n<ol>\n<li><span style=\"font-weight: 400;\"> Instale <\/span><span style=\"font-weight: 400;\">nvm<\/span><span style=\"font-weight: 400;\"> (Gestor de versiones de nodo) ejecutando:<\/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;\">Carga <\/span><span style=\"font-weight: 400;\">nvm<\/span><span style=\"font-weight: 400;\">:<\/span><\/li>\n<\/ol>\n<pre>    fuente ~\/.bashrc<\/pre>\n<ol start=\"3\">\n<li><span style=\"font-weight: 400;\">Instale Node.js con <\/span><span style=\"font-weight: 400;\">nvm<\/span><span style=\"font-weight: 400;\">:<\/span><\/li>\n<\/ol>\n<pre>    nvm install node<\/pre>\n<ol start=\"3\">\n<li><span style=\"font-weight: 400;\"> Compru\u00e9belo escribiendo <\/span><span style=\"font-weight: 400;\">nodo -v<\/span><span style=\"font-weight: 400;\"> y <\/span><span style=\"font-weight: 400;\">npm -v<\/span><span style=\"font-weight: 400;\">.<br><br><\/span><\/li>\n<\/ol>\n<h2><b>Conclusi\u00f3n<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Instalar Node.js y npm es sencillo, ya sea en Windows, macOS o Linux. Siguiendo esta gu\u00eda, tendr\u00e1s Node.js y npm funcionando en poco tiempo, listo para tus proyectos de desarrollo. Con <a href=\"https:\/\/www.carmatec.com\/hire-developers\/hire-nodejs-developer\/\">Nodo.js<\/a> instalado, ya est\u00e1 todo listo para explorar el mundo del lado del servidor <a href=\"https:\/\/www.carmatec.com\/hire-developers\/hire-javascript-developer\/\">javascript<\/a> y empezar a construir <a href=\"https:\/\/www.carmatec.com\/web-application-development\/\">aplicaciones<\/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\/es\/wp-json\/wp\/v2\/posts\/41966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stage.carmatec.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stage.carmatec.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stage.carmatec.com\/es\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/stage.carmatec.com\/es\/wp-json\/wp\/v2\/comments?post=41966"}],"version-history":[{"count":6,"href":"https:\/\/stage.carmatec.com\/es\/wp-json\/wp\/v2\/posts\/41966\/revisions"}],"predecessor-version":[{"id":41973,"href":"https:\/\/stage.carmatec.com\/es\/wp-json\/wp\/v2\/posts\/41966\/revisions\/41973"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stage.carmatec.com\/es\/wp-json\/wp\/v2\/media\/41972"}],"wp:attachment":[{"href":"https:\/\/stage.carmatec.com\/es\/wp-json\/wp\/v2\/media?parent=41966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stage.carmatec.com\/es\/wp-json\/wp\/v2\/categories?post=41966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stage.carmatec.com\/es\/wp-json\/wp\/v2\/tags?post=41966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}