<?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: Shubham Yadav</title>
    <description>The latest articles on DEV Community by Shubham Yadav (@shubham_yadav_e5e5489ea71).</description>
    <link>https://dev.to/shubham_yadav_e5e5489ea71</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%2F3288631%2Fe85c8e49-50a0-45c1-8984-f7f8271527c0.png</url>
      <title>DEV Community: Shubham Yadav</title>
      <link>https://dev.to/shubham_yadav_e5e5489ea71</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shubham_yadav_e5e5489ea71"/>
    <language>en</language>
    <item>
      <title>Solving the "EACCES: permission denied" Error When Installing TypeScript Globally with npm</title>
      <dc:creator>Shubham Yadav</dc:creator>
      <pubDate>Mon, 23 Jun 2025 20:00:50 +0000</pubDate>
      <link>https://dev.to/shubham_yadav_e5e5489ea71/solving-the-eacces-permission-denied-error-when-installing-typescript-globally-with-npm-2o9m</link>
      <guid>https://dev.to/shubham_yadav_e5e5489ea71/solving-the-eacces-permission-denied-error-when-installing-typescript-globally-with-npm-2o9m</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ouh34yqgilwlewag8u1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ouh34yqgilwlewag8u1.png" alt="Image description" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Recently, while trying to install TypeScript globally on my system using npm, I ran into a common but frustrating error:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install -g typescript&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And boom — I got hit with this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm ERR! code EACCES&lt;br&gt;
npm ERR! syscall mkdir&lt;br&gt;
npm ERR! path /usr/local/lib/node_modules/typescript&lt;br&gt;
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/typescript'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This error means that npm doesn't have permission to create directories in the system's global modules folder (/usr/local/lib/node_modules/). This is a pretty common issue on macOS and Linux systems when trying to install global npm packages without sufficient privileges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding the Problem&lt;/strong&gt;&lt;br&gt;
EACCES stands for Error: Access Denied. When you see this error during a global installation, it usually means one of two things:&lt;/p&gt;

&lt;p&gt;You're trying to write to a system directory that requires admin privileges.&lt;/p&gt;

&lt;p&gt;Your npm configuration is pointing to a directory that you don't have access to.&lt;br&gt;
&lt;strong&gt;Solution : Use sudo (Quick Fix)&lt;/strong&gt;&lt;br&gt;
If you trust the package and you just want it to work right now, run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo npm install -g typescript&lt;/code&gt;&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>linux</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
