{"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":"comment-installer-node-js-et-npm-sur-windows-macos-linux","status":"publish","type":"post","link":"https:\/\/stage.carmatec.com\/fr_fr\/blog\/comment-installer-node-js-et-npm-sur-windows-macos-linux\/","title":{"rendered":"Comment installer Node.js et npm sur Windows, macOS et 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>Introduction<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Node.js est un puissant environnement d'ex\u00e9cution JavaScript qui vous permet d'ex\u00e9cuter du code JavaScript c\u00f4t\u00e9 serveur. npm (Node Package Manager) est le gestionnaire de paquets par d\u00e9faut pour Node.js et est essentiel pour g\u00e9rer les paquets et les d\u00e9pendances JavaScript. Dans ce guide, nous allons vous guider \u00e0 travers les \u00e9tapes d'installation de Node.js et de npm sur Windows, macOS et Linux.<\/span><\/p>\n<h2><b>1. Installation de Node.js et de npm sous Windows<\/b><\/h2>\n<p><b>\u00c9tape 1 : T\u00e9l\u00e9charger Node.js<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Visitez le site<\/span><a href=\"https:\/\/nodejs.org\/\"> <span style=\"font-weight: 400;\">Site officiel 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;\">T\u00e9l\u00e9chargez le programme d'installation Windows (.msi) pour la version LTS (Long Term Support).<br><br><\/span><\/li>\n<\/ol>\n<p><b>\u00c9tape 2 : Installer Node.js<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ex\u00e9cuter le fichier t\u00e9l\u00e9charg\u00e9 <\/span><span style=\"font-weight: 400;\">.msi<\/span><span style=\"font-weight: 400;\"> d\u00e9poser.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Suivez les instructions d'installation, en vous assurant que vous cochez la case d'inclusion de <\/span><span style=\"font-weight: 400;\">npm<\/span><span style=\"font-weight: 400;\"> dans l'installation.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Cliquez sur \"Suivant\" et \"Installer\" pour terminer l'installation.<br><br><\/span><\/li>\n<\/ol>\n<p><b>\u00c9tape 3 : V\u00e9rifier l'installation<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ouvrez l'invite de commande.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Type <\/span><span style=\"font-weight: 400;\">node -v<\/span><span style=\"font-weight: 400;\"> pour v\u00e9rifier la version de Node.js.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Type <\/span><span style=\"font-weight: 400;\">npm -v<\/span><span style=\"font-weight: 400;\"> pour v\u00e9rifier la version de npm.<br><br><\/span><\/li>\n<\/ol>\n<h2><b>2. Installation de Node.js et de npm sur macOS<\/b><\/h2>\n<p><b>\u00c9tape 1 : Installer Node.js via Homebrew<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Terminal ouvert.<br><br><\/span><\/li>\n<\/ol>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Installer<\/span><a href=\"https:\/\/brew.sh\/\"> <span style=\"font-weight: 400;\">Homebrew<\/span><\/a><span style=\"font-weight: 400;\"> si ce n'est d\u00e9j\u00e0 fait en courant :<\/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. installer Node.js et npm avec :<\/span><span style=\"font-weight: 400;\"><br><\/span><\/p>\n<pre><span style=\"font-weight: 400;\">      brew install node<\/span><\/pre>\n<p><\/p>\n<p><b>\u00c9tape 2 : V\u00e9rifier l'installation<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Dans Terminal, tapez <\/span><span style=\"font-weight: 400;\">node -v<\/span><span style=\"font-weight: 400;\"> pour v\u00e9rifier la version de Node.js.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Type <\/span><span style=\"font-weight: 400;\">npm -v<\/span><span style=\"font-weight: 400;\"> pour v\u00e9rifier la version de npm.<br><br><\/span><\/li>\n<\/ol>\n<p><b>M\u00e9thode alternative : T\u00e9l\u00e9charger \u00e0 partir du site web<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Visitez le site<\/span><a href=\"https:\/\/nodejs.org\/\"> <span style=\"font-weight: 400;\">Site officiel 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;\">T\u00e9l\u00e9chargez le programme d'installation pour macOS et ex\u00e9cutez le programme <\/span><span style=\"font-weight: 400;\">.pkg<\/span><span style=\"font-weight: 400;\"> d\u00e9poser.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Suivez les instructions pour terminer l'installation.<\/span><\/li>\n<\/ol>\n<h2><b>3. Installation de Node.js et de npm sous Linux<\/b><\/h2>\n<p><b>\u00c9tape 1 : Mise \u00e0 jour de l'index de votre paquet<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Terminal ouvert.<br><br><\/span><\/li>\n<\/ol>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> Ex\u00e9cutez la commande suivante pour mettre \u00e0 jour l'index du paquet :<\/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>\u00c9tape 2 : Installer Node.js et npm<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Pour les distributions bas\u00e9es sur 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>Pour les distributions bas\u00e9es sur 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>Pour 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>\u00c9tape 3 : V\u00e9rifier l'installation<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Dans Terminal, tapez <\/span><span style=\"font-weight: 400;\">node -v<\/span><span style=\"font-weight: 400;\"> pour v\u00e9rifier la version de Node.js.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Type <\/span><span style=\"font-weight: 400;\">npm -v<\/span><span style=\"font-weight: 400;\"> pour v\u00e9rifier la version de npm.<br><br><\/span><\/li>\n<\/ol>\n<h2><b>M\u00e9thode alternative : Installation via Node Version Manager (nvm)<\/b><\/h2>\n<ol>\n<li><span style=\"font-weight: 400;\"> Installer <\/span><span style=\"font-weight: 400;\">nvm<\/span><span style=\"font-weight: 400;\"> (Node Version Manager) en ex\u00e9cutant :<\/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;\">Chargement <\/span><span style=\"font-weight: 400;\">nvm<\/span><span style=\"font-weight: 400;\">:<\/span><\/li>\n<\/ol>\n<pre>    source ~\/.bashrc<\/pre>\n<ol start=\"3\">\n<li><span style=\"font-weight: 400;\">Installer Node.js en utilisant <\/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;\"> V\u00e9rifiez en tapant <\/span><span style=\"font-weight: 400;\">node -v<\/span><span style=\"font-weight: 400;\"> et <\/span><span style=\"font-weight: 400;\">npm -v<\/span><span style=\"font-weight: 400;\">.<br><br><\/span><\/li>\n<\/ol>\n<h2><b>Conclusion<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">L'installation de Node.js et de npm est simple, que vous soyez sous Windows, macOS ou Linux. En suivant ce guide, vous aurez Node.js et npm op\u00e9rationnels en un rien de temps, pr\u00eats pour vos projets de d\u00e9veloppement. Avec <a href=\"https:\/\/www.carmatec.com\/hire-developers\/hire-nodejs-developer\/\">Noeud.js<\/a> install\u00e9, vous \u00eates pr\u00eat \u00e0 explorer le monde de l'informatique c\u00f4t\u00e9 serveur. <a href=\"https:\/\/www.carmatec.com\/hire-developers\/hire-javascript-developer\/\">Javascript<\/a> et commencez \u00e0 construire des <a href=\"https:\/\/www.carmatec.com\/web-application-development\/\">applications<\/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\/fr_fr\/wp-json\/wp\/v2\/posts\/41966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stage.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stage.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stage.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/stage.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/comments?post=41966"}],"version-history":[{"count":6,"href":"https:\/\/stage.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/posts\/41966\/revisions"}],"predecessor-version":[{"id":41973,"href":"https:\/\/stage.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/posts\/41966\/revisions\/41973"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stage.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/media\/41972"}],"wp:attachment":[{"href":"https:\/\/stage.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/media?parent=41966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stage.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/categories?post=41966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stage.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/tags?post=41966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}