<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: surendra sahu</title>
    <description>The latest articles on DEV Community by surendra sahu (@surendra_sahu_dbf30c18278).</description>
    <link>https://dev.to/surendra_sahu_dbf30c18278</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2807825%2Fe7d9b256-b52c-42cd-b69f-caff16beddbc.png</url>
      <title>DEV Community: surendra sahu</title>
      <link>https://dev.to/surendra_sahu_dbf30c18278</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/surendra_sahu_dbf30c18278"/>
    <language>en</language>
    <item>
      <title>How to Install Node.js: A Step-by-Step Guide</title>
      <dc:creator>surendra sahu</dc:creator>
      <pubDate>Mon, 24 Feb 2025 04:51:56 +0000</pubDate>
      <link>https://dev.to/surendra_sahu_dbf30c18278/how-to-install-nodejs-a-step-by-step-guide-3ckf</link>
      <guid>https://dev.to/surendra_sahu_dbf30c18278/how-to-install-nodejs-a-step-by-step-guide-3ckf</guid>
      <description>&lt;p&gt;Node.js is a powerful runtime environment that allows developers to run JavaScript on the server side. Whether you're a beginner or an experienced developer, installing Node.js correctly is crucial. In this guide, we'll walk through the installation process for Windows, macOS, and Linux, along with verifying the installation and setting up a basic project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use Node.js?
&lt;/h2&gt;

&lt;p&gt;Node.js is widely used for backend development, real-time applications, APIs, and more. Some benefits include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Non-blocking, event-driven architecture.&lt;/li&gt;
&lt;li&gt;High performance due to the V8 JavaScript engine.&lt;/li&gt;
&lt;li&gt;Large ecosystem with npm (Node Package Manager).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installing Node.js on Windows
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Download the Installer
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Visit the official &lt;a href="https://nodejs.org/" rel="noopener noreferrer"&gt;Node.js download page&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Choose the LTS (Long-Term Support) version for stability.&lt;/li&gt;
&lt;li&gt;Download the Windows Installer (.msi file).&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 2: Run the Installer
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open the downloaded .msi file.&lt;/li&gt;
&lt;li&gt;Follow the installation wizard and accept the terms.&lt;/li&gt;
&lt;li&gt;Select the default settings and complete the installation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 3: Verify the Installation
&lt;/h3&gt;

&lt;p&gt;Open Command Prompt (Win + R, type &lt;code&gt;cmd&lt;/code&gt;, and press Enter) and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This should display the installed Node.js version. Also, verify npm (Node Package Manager) with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installing Node.js on macOS
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Use Homebrew (Recommended)
&lt;/h3&gt;

&lt;p&gt;If you don’t have Homebrew, install it first by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/bin/bash &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, install Node.js with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Verify Installation
&lt;/h3&gt;

&lt;p&gt;Check the versions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;-v&lt;/span&gt;
npm &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installing Node.js on Linux
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Update the System Packages
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt upgrade &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Install Node.js using apt
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;nodejs npm &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Verify Installation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;-v&lt;/span&gt;
npm &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installing Node.js via Node Version Manager (NVM)
&lt;/h2&gt;

&lt;p&gt;Using NVM is the best way to manage multiple Node.js versions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Install NVM
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart the terminal and verify the installation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;command&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; nvm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Install and Use Node.js
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nvm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--lts&lt;/span&gt;
nvm use &lt;span class="nt"&gt;--lts&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Creating a Simple Node.js Project
&lt;/h2&gt;

&lt;p&gt;Let's create a basic Node.js application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Initialize a New Project
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-node-app
&lt;span class="nb"&gt;cd &lt;/span&gt;my-node-app
npm init &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a &lt;code&gt;package.json&lt;/code&gt; file, which manages the project dependencies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Create an &lt;code&gt;index.js&lt;/code&gt; File
&lt;/h3&gt;

&lt;p&gt;Inside the project folder, create &lt;code&gt;index.js&lt;/code&gt; and add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, Node.js!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Run the Script
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node index.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello, Node.js!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Now, you've successfully installed Node.js on your system and created a simple project. If you’re working on enterprise-level applications, integrating different systems is crucial. Check out our &lt;strong&gt;&lt;a href="https://www.estpl.in/system-integration" rel="noopener noreferrer"&gt;System Integration Services&lt;/a&gt;&lt;/strong&gt; to streamline your development workflow efficiently.&lt;/p&gt;

&lt;p&gt;Node.js provides a vast ecosystem for building scalable applications. Keep exploring and happy coding!&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>css</category>
      <category>programming</category>
    </item>
    <item>
      <title>Google Search Console Meta Verification Issue in Angular and Its Solution</title>
      <dc:creator>surendra sahu</dc:creator>
      <pubDate>Mon, 03 Feb 2025 07:04:29 +0000</pubDate>
      <link>https://dev.to/surendra_sahu_dbf30c18278/google-search-console-meta-verification-issue-in-angular-and-its-solution-3dao</link>
      <guid>https://dev.to/surendra_sahu_dbf30c18278/google-search-console-meta-verification-issue-in-angular-and-its-solution-3dao</guid>
      <description>&lt;p&gt;If you have built a website using Angular and when adding the Google Search Console meta verification tag, it automatically removes "/&amp;gt; and replaces it with "&amp;gt;, causing verification to fail, then this issue occurs due to Angular's template parsing mechanism.&lt;/p&gt;

&lt;p&gt;🚨 Reason for the Issue&lt;br&gt;
Angular processes HTML differently and may modify self-closing tags () by converting them into a standard HTML format (). This happens because self-closing tags are not mandatory in HTML5, and Angular tries to optimize them.&lt;/p&gt;

&lt;p&gt;🔍 Impact of the Issue&lt;br&gt;
Google Search Console expects the exact meta tag format as provided, and if Angular modifies it, the verification process fails.&lt;/p&gt;

&lt;p&gt;✅ Solutions to Fix the Issue&lt;br&gt;
1️⃣ Use Angular's Meta Service to Add Meta Tags Dynamically&lt;br&gt;
Instead of adding the meta tag directly in index.html, use Angular's Meta Service to ensure it remains unchanged:&lt;/p&gt;

&lt;p&gt;import { Component } from '@angular/core';&lt;br&gt;
import { Meta } from '@angular/platform-browser';&lt;/p&gt;

&lt;p&gt;@Component({&lt;br&gt;
  selector: 'app-root',&lt;br&gt;
  templateUrl: './app.component.html',&lt;br&gt;
  styleUrls: ['./app.component.css']&lt;br&gt;
})&lt;br&gt;
export class AppComponent {&lt;br&gt;
  constructor(private meta: Meta) {&lt;br&gt;
    this.meta.addTag({&lt;br&gt;
      name: 'google-site-verification',&lt;br&gt;
      content: 'YOUR_VERIFICATION_CODE'&lt;br&gt;
    });&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;This ensures that Angular does not modify the meta tag, and Google can read it correctly.&lt;/p&gt;

&lt;p&gt;2️⃣ Directly Edit index.html to Add the Meta Tag&lt;br&gt;
If you are adding the meta tag in index.html, make sure it is inside the &lt;/p&gt; section and that Angular does not override it:



&lt;p&gt;💡 Even if the self-closing /&amp;gt; is removed, it should not cause a problem. But if verification still fails, use the Meta Service method.&lt;/p&gt;

&lt;p&gt;3️⃣ Use Server-Side Rendering (SSR) with Angular Universal&lt;br&gt;
If your website uses Server-Side Rendering (SSR), Angular might add meta tags after the page loads, which means Google may not detect them.&lt;br&gt;
🔹 Solution: Use Angular Universal (@angular/platform-server) so that meta tags are included in pre-rendered HTML before the page loads.&lt;/p&gt;

&lt;p&gt;🔥 Conclusion&lt;br&gt;
👉 Angular modifies meta tags, which can cause Google Search Console verification to fail.&lt;br&gt;
👉 Using the Angular Meta Service API or modifying index.html directly can resolve this issue.&lt;br&gt;
👉 If your site uses SSR, then Angular Universal is the best solution.&lt;/p&gt;

&lt;p&gt;📌 Still facing issues? Let me know in the comments! 🚀&lt;/p&gt;

&lt;p&gt;follow: &lt;a href="https://xn--i1bf9f0g.com/" rel="noopener noreferrer"&gt;egg rate today&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
