<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by George Oikonomopoulos on Medium]]></title>
        <description><![CDATA[Stories by George Oikonomopoulos on Medium]]></description>
        <link>https://medium.com/@geor.oikonomopoulos?source=rss-76609869d7a5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aIWZpl4ZVfz0tAQj0mxLHA.jpeg</url>
            <title>Stories by George Oikonomopoulos on Medium</title>
            <link>https://medium.com/@geor.oikonomopoulos?source=rss-76609869d7a5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:18:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@geor.oikonomopoulos/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to suggest the usage of the new Control Flow with custom ESLint rules]]></title>
            <link>https://medium.com/@geor.oikonomopoulos/how-to-suggest-the-usage-of-the-new-control-flow-with-custom-eslint-rules-9d7f55d5fb4d?source=rss-76609869d7a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d7f55d5fb4d</guid>
            <category><![CDATA[eslint]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[angular-cli]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[eslint-plugin]]></category>
            <dc:creator><![CDATA[George Oikonomopoulos]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 21:02:39 GMT</pubDate>
            <atom:updated>2023-10-26T21:02:39.129Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone!<br>Recently I did a small presentation at the <a href="https://www.meetup.com/angular-athens/events/296119979/">19th Angular Athens Meetup</a> about custom ESLint rules and in this presentation I will give a brief summary.<br>The use case was that we wake up the day after the release of the new Control Flow Syntax and we would like to suggest the usage to our team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PK_LXCKi3rNmxMBV3s0cfg.png" /></figure><p>The first thing we need to do add the <a href="https://github.com/angular-eslint/angular-eslint">Angular ESLint</a> to our application:</p><pre>ng add @angular-eslint/schematics</pre><p>Now my application is ready for linting since all the packages I need were added and the .eslintrc.json contains all the needed configuration. Also if we have a look inside the .eslintrc.json we will notice that there are 2 different configurations, one for *.ts and one for *.html. In our case, we will be adding rules in the *.html block.</p><h3>Create the custom rule</h3><p>The recipe for a new custom rule is the following:</p><p>1. Create a plugin name with prefix <strong>eslint-plugin-**</strong></p><p>2. A .js/.ts file containing the custom rule logic</p><p>3. The Plugin should be a project dependency and part of <strong>package.json </strong>&amp; <strong>node_modules</strong></p><p>4. Add the new rule to your application</p><h3>Create a new plugin</h3><p>This can be done with <strong>2 ways</strong>. The <strong>first</strong> is to create a new library and publish it to npm registry and the <strong>second</strong> is to create a new folder inside our workspace and treat it as a library(add a package.json, create separate scripts for building, etc).<br>We will go with the first option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aqadpzS354-6CDX1i08S_Q.png" /><figcaption>package.json</figcaption></figure><p>We created a minimal project with a simple bundler for typescript and just and index.ts that exports all our rules.</p><h3>Create the rule</h3><p>Our target is to create a rule that detects an ng-container with ngIf and suggests the usage of the Flow Control. We will name our rule “<strong>no-ng-container</strong>” and the name of the file <strong>no-ng-container.ts.</strong></p><pre>import { ESLintUtils } from &#39;@typescript-eslint/utils&#39;;<br><br>export const RULE_NAME = &#39;no-ng-container&#39;;<br><br>export const noNgContainer = ESLintUtils.RuleCreator((ruleName) =&gt; ruleName)({<br>    name: RULE_NAME,<br>    meta: {<br>        type: &#39;suggestion&#39;,<br>        docs: {<br>            description: `Prompts you to use the new control flow`,<br>            recommended: &#39;warn&#39;,<br>        },<br>        schema: [],<br>        messages: {<br>            default: &#39;Try to use the new control flow. e.g @if (condition) {   } &#39;<br>        },<br>    },<br>    defaultOptions: [],<br>    create(context) {<br>        return {<br>            [`Template[tagName=ng-container]`](node: any) {<br>               if(node[&#39;templateAttrs&#39;].some((a: any) =&gt; a.name === &#39;ngIf&#39;)) {<br>                   context.report({<br>                       node,<br>                       messageId: &#39;default&#39;,<br>                       data: {<br>                           element: node.name,<br>                       }<br>                   })<br>               } else {<br>                return;<br>               }<br>            }<br>        };<br>    }<br>});</pre><p>The rule is composed of 3 major parts:</p><ol><li><strong>name: </strong>The name of the rule</li><li><strong>meta: </strong>Some information regarding the rule, like rule type and description, but most important the message that we are going to show to the developer.</li><li><strong>create function: </strong>Returns an object with methods that ESLint uses while traversing the AST.<br>So here we need to locate our node in the <strong>AST Tree</strong>. For this task, we will use the <a href="https://astexplorer.net/">AST Explorer</a>. We will set the language as <strong>HTML</strong> and parser as <strong>angular-eslint/template-parser. </strong>Then we can paste our code and locate the desired tree node only by clicking on it. We see that our tree node is named <strong>Template</strong> and has a <strong>tagName </strong>property with value <strong>ng-container.</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nKmJYFmbSOZCgqG-WCgjlA.png" /></figure><p>Finally I will update the <strong>index.ts </strong>so it exports my rule and we are done with the plugin development. All is needed now is to publish it to npm registry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OW_Ih7lb4e5WMsNYooemHQ.png" /><figcaption>index.ts</figcaption></figure><h3>Write the test</h3><p>I added <strong>Jest </strong>as a dependency to my library and I will use to run my tests.<br>For the .spec file I got an inspiration from the <a href="https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template">angular-eslint</a> repo and in a few minutes my test was up and running!</p><pre>const valid = [<br>  &#39;&lt;div *ngIf=&quot;show&quot;&gt;&lt;/div&gt;&#39;,<br>  &#39;&lt;ng-container&gt;&#39;,<br>  &#39;&lt;ng-container #templ&gt;&#39;,<br>  &#39;&lt;ng-container any&gt;&#39;,<br>];<br>const invalid = [<br>  convertAnnotatedSourceToFailureCase({<br>    messageId,<br>    description: &#39;Prompts you to use the new control flow&#39;,<br>    annotatedSource: `<br>&lt;ng-container *ngIf=&quot;true&quot;&gt;<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>          `,<br>    data: { element: &#39;ng-container&#39; }<br>  })<br>];<br><br>const ruleTester = new RuleTester({<br>  parser: &#39;@angular-eslint/template-parser&#39;,<br>});<br><br>ruleTester.run(RULE_NAME, noNgContainer, {<br>  valid,<br>  invalid,<br>});<br>//spec.ts file</pre><h3>Use the rule in our application</h3><p>Firstly I’m going to add the plugin dependency to my dev-dependencies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*u_poKOaT7CA7RVBPtkQSPw.png" /></figure><p>Then I will go to my .eslintrc.json file and I will add the rule as following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZi9MFMBhN2ruPbcsiNFxg.png" /><figcaption>.eslintrc.json</figcaption></figure><blockquote><strong>The important thing</strong> here is to skip the “<strong>eslint-plugin-” </strong>prefix as it will cause: “Definition for rule ‘eslint-plugin-angular-templates/no-ng-container’ was not found”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FBGis_g0TQw4yu49qaujhQ.png" /></figure><p>That was it! <br>You can find the <a href="https://github.com/george-oiko/eslint-plugin-angular-template-rules">repo here</a>!</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d7f55d5fb4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build/deploy part of your Angular application]]></title>
            <link>https://medium.com/@geor.oikonomopoulos/how-to-build-deploy-part-of-your-angular-application-68cbd88d495e?source=rss-76609869d7a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/68cbd88d495e</guid>
            <category><![CDATA[angular2]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[George Oikonomopoulos]]></dc:creator>
            <pubDate>Mon, 20 Mar 2023 08:46:20 GMT</pubDate>
            <atom:updated>2023-03-20T08:48:44.205Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever needed to build/deploy only a part of your <strong>Angular </strong>application or maybe hide some routes in particular environments?<br>This article will help you decrease your bundle size/build time by shipping only what’s needed.</p><p>Some of the concepts that we will cover are:</p><ul><li>Lazy load routes (using standalone components)</li><li>CLI configuration options — file replacements</li><li>Angular new features like: <strong>bootstrapApplication</strong>, <strong>provideRouter()</strong>, <strong>RouterOutlet</strong>, <strong>RouterLinkWithHref</strong></li></ul><h3>Getting started</h3><p>Firstly, we created an <strong>Angular v15 </strong>application to get advantage of some new features, but it doesn’t mean that this example isn’t applicable to previous versions.<br>We will generate 2 components that will also represent 2 application routes. We will name our Components and routes as <strong>First &amp; Second.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZZMz8D_QC_WtxtPZpByDOA.png" /><figcaption>Application routes</figcaption></figure><p>Then, we will go to our <strong>AppComponent</strong> to place our routes and by the way we will turn it to <strong>standalone component</strong>. This means that we will need to import the directives that we need, such as the <strong>RouterOutlet.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BRmu72un8CI2H1VvXXYOiQ.png" /><figcaption>AppComponent as standalone</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KPbhEoEtJmVwxyO2su0yoQ.png" /><figcaption>AppComponent template</figcaption></figure><p>Since the AppComponent is standalone, our <strong>main.ts </strong>will be slightly different than the default. Notice that we are loading our routes here using the <strong>provideRouter() </strong>method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WyNqXzJQdwmGw4RcMk7r5A.png" /><figcaption>main.ts</figcaption></figure><p>Our initial setup for lazy load seems ready. So we will give it a shot by running a simple:</p><pre>ng build</pre><p>And here what is produced:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P4Xti25jfjRHQIuEdrfGkQ.png" /><figcaption>ng build output</figcaption></figure><p>The build produced all the main files plus <strong>2 lazy loaded chunks </strong>one for each route.</p><h3>Build part of the Application</h3><p>So let’s come to our scenario which says that we have different installations and one of our environments only makes use of the first route.</p><p>Our approach will be to provide <strong>different build configuration</strong> for each case by adding some more options to our <strong>angular.json.</strong></p><p>Let’s start by adding two alternative <strong>route files</strong>. The <strong>routes.first.ts</strong> and the <strong>routes.second.ts</strong> under the same folder as the <strong>routes.ts . </strong>The routes.first.ts will contain the only the first route and the second will have it’s own route as well. Which means that it would look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQYtlfu2OW_VFYWVW04cLA.png" /><figcaption>alternative route.ts file</figcaption></figure><p>Now we somehow need to tell Angular that we want a build output that will only contain this route.<br>This will take place inside angular.json:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xsh6nK9IATN0k_bop58s0w.png" /><figcaption>angular.json</figcaption></figure><p>We introduced two new <strong>configurations </strong>first &amp; second and each configuration uses the <strong>fileReplacements option </strong>in order to swap the routes file each time the configuration is selected.</p><p>Now we just have to run:</p><pre>ng build --configurations:first</pre><p>The build output contains only the selected route/chunk which the first in our case:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9fhEysDu0myQUcnHuCB0Dw.png" /></figure><h3>Partial ng serve as well</h3><p>By adding a couple more lines to our angular.json we can use this configuration when we serve:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lN43H8tlCM9UepRM9BbhnA.png" /><figcaption>angular.json</figcaption></figure><p>The serve command will be:</p><pre>ng serve --configuration=first</pre><h3><strong>Dynamic route menu</strong></h3><p>Last thing we can do is to generate our menu according to the selected configuration.<br>A quick solution for this would be the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vYaaOZxR_vrHMgm92zB-lg.png" /></figure><p>We import all the required directives separately, without the need of the whole <strong>Common module</strong>. This will also help us reduce the final bundle size. Then we import the routes file (which will be replaced with the desired one) and map to the <strong>route path.</strong></p><p>Finally we iterate on the routes in our template:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b72OSJ3nupRrW3DLFMMY5Q.png" /></figure><h3>Conclusion</h3><p>That’s all! I hope you enjoyed this article!</p><p>You can find the repo with the above case <a href="https://github.com/george-oiko/partial-app">here</a>.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68cbd88d495e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular component dynamic import prioritization using ngComponentOutlet]]></title>
            <link>https://medium.com/@geor.oikonomopoulos/angular-component-dynamic-import-prioritization-using-ngcomponentoutlet-d9681becba9b?source=rss-76609869d7a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9681becba9b</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[webpack]]></category>
            <dc:creator><![CDATA[George Oikonomopoulos]]></dc:creator>
            <pubDate>Mon, 20 Feb 2023 12:37:07 GMT</pubDate>
            <atom:updated>2023-02-20T13:52:46.563Z</atom:updated>
            <content:encoded><![CDATA[<p>If you have a page with a lot of content and you not only want to speed up the load process but also control the load priority, then this article is probably for you.</p><p>So some of the concepts that you will read below are:</p><ul><li>*ngComponentOutlet</li><li>Standalone components</li><li>dynamic imports using import()</li><li>import prioritization using Webpack comments /**/</li><li>BONUS: simple directive that informs you when your container is in View</li></ul><p>For our example I created a project with 3 standalone components: education, information and name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*Jnweey2ncaKCv0HqzJYzug.png" /></figure><p>Traditionally I would use my components as following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*SHdkDzIxdTnGB20UyzO1Ug.png" /></figure><p>This means that all three components would be part of my application’s main chunk:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RZvSgRMS7jP3B10VFz_otg.png" /></figure><p>And they would all load synchronously when my app component loads.</p><h3><strong>First step: Split the chunk</strong></h3><p>In order to achieve that, i will use dynamic <strong>import()</strong> for the component load and I will then put it in my template using the <a href="https://angular.io/api/common/NgComponentOutlet"><strong>*ngComponentOutlet</strong></a>. Then my component would look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_fGfkfSpG_50UZPLJm4ZQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ep-1Iqw79d5sRB3nWK55cw.png" /></figure><p>With this trick not only theses 3 components load <strong>asynchronously</strong> but the <strong>ng build </strong>now produces 3 more chunks one for each component:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T7NWEq9XlGKdD0Aps0knrw.png" /></figure><p><em>A very good video explaining dynamic components is created by </em><strong><em>Profanis</em></strong><em> and you can find it </em><a href="https://www.youtube.com/watch?v=n2uXyzqL1lA&amp;ab_channel=CodeShotsWithProfanis"><em>here</em></a><em>.</em></p><h3>Second step: Prioritize component load</h3><p>In order to go even further, we are assuming that not all components have the same value for the user. Some might be crucial for the page some others not.</p><p>So, in order to load important components first, we will tell <strong>Webpack </strong>which import should load first and which is least important.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQ38bSSO6hKNonxjJ7R-Sg.png" /></figure><p>The above tells Webpack that Information component should be loaded first, Name second and Education is the least important and should load last.</p><p>This leads to the following result to our browser:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BhgU_nsaEvBLoQjbRGQblw.png" /></figure><h3>Part Three: BONUS lazy load component</h3><p>This was part of a small experiment I did.</p><p>The case was that I wanted to lazy load a component dynamically only when it becomes visible in my View. In order to achieve that I created a directive that informs me when my container becomes visible to the user.</p><p>It looks like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8jtM4GLtx1IuRDuwpBiC6A.png" /></figure><p>I’m starting with startWith(0) because in case that the container is already visible, I want to inform the listeners.</p><p>Next, I will add some breaks to my templates because I need some scrolling and I will handle the inView event in my component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQPQFOyy-P1z7TreP3fi8A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ynaPxXPlmgtck3IQcBBTyQ.png" /></figure><p>And that’s all!</p><p>I hope this article gave you some ideas for you implementations!</p><p>Project is published <a href="https://github.com/george-oiko/dynamic-import">here</a>.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9681becba9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Speed up Angular CLI build time excluding some optimization plugins]]></title>
            <link>https://medium.com/@geor.oikonomopoulos/speed-up-angular-cli-build-time-excluding-some-optimization-plugins-a68b6ae8cdd9?source=rss-76609869d7a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a68b6ae8cdd9</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[webpack]]></category>
            <dc:creator><![CDATA[George Oikonomopoulos]]></dc:creator>
            <pubDate>Thu, 01 Aug 2019 12:27:51 GMT</pubDate>
            <atom:updated>2019-08-01T12:29:47.518Z</atom:updated>
            <content:encoded><![CDATA[<p>When building a big Angular project you will notice that the production build time might take several minutes and some times even over one hour. Of course you can skip the optimization by turning the optimization flag to false in your angular.json , but this way you will lose all of the optimizations. What we will try to do in this article is to turn off the <strong>module concatenation plugin </strong>in order to keep other plugins like the minification one.</p><p>Our projects runs <strong>Angular version 8.1.2</strong> has over 1000 screens and the total build time for production is ~45 minutes.</p><p>My steps to skip the module concatenation process is the following:</p><ol><li>npm i -D @angular-builders/custom-webpack</li></ol><pre>&quot;devDependencies&quot;: {<br>&quot;@angular-builders/custom-webpack&quot;: &quot;8.1.0&quot;</pre><p>2. Change the angular.json configuration to the following</p><pre>&quot;architect&quot;: {<br>    &quot;build&quot;: {<br>      &quot;builder&quot;: &quot;@angular-builders/custom-webpack:browser&quot;,<br>      &quot;options&quot;: {<br>        &quot;customWebpackConfig&quot;: {<br>           &quot;path&quot;: &quot;./extra-webpack.config.js&quot;<br>        },</pre><p>3. Create a new file named <strong>extra-webpack.config.js</strong> next to <strong>angular.json </strong>with the following code</p><pre>module.exports = {<br>    optimization: {<br>       concatenateModules: false<br>    }<br>};</pre><p>With the above configuration the total build time falls down to <strong>19 minutes!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a68b6ae8cdd9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solving the node-sass binding.node error problem]]></title>
            <link>https://medium.com/@geor.oikonomopoulos/solving-the-node-sass-binding-node-error-problem-9ca4b836db0d?source=rss-76609869d7a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ca4b836db0d</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[node-sass]]></category>
            <category><![CDATA[angular-cli]]></category>
            <category><![CDATA[node-modules]]></category>
            <dc:creator><![CDATA[George Oikonomopoulos]]></dc:creator>
            <pubDate>Wed, 05 Dec 2018 16:44:25 GMT</pubDate>
            <atom:updated>2018-12-06T09:27:48.813Z</atom:updated>
            <content:encoded><![CDATA[<p>People that work in companies with very strict download policy will probably have encountered such problems, especially with node modules.</p><p><strong>Angular-cli</strong> which is one of the most popular tools for creating angular apps has a dependency on <strong>node-sass</strong>. So if you create a brand new application and try an <strong>npm install</strong> command, <strong>node-sass</strong> will try to download a <strong>binding.node </strong>file. In my case the companie’s firewall was <strong>blocking </strong>the particular download and i was receiving an error.</p><p>The answer came after digging inside the node-sass code and the fallbacks of this download failure.</p><p>So lets start:</p><ol><li><a href="https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-48_binding.node">Download</a> this binding node from another computer.</li><li>Choose a folder and make sure you have administrative rights (In my case C:\Users\myUser\AppData\Roaming) and create a folder named for example <strong>sass-binary.</strong> Inside this folder you can put the binary you downloaded previously inside a folder with its version.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*zhRpc11oNC7E2AiRmBldsQ.png" /></figure><p>3. Go to your <strong>.npmrc</strong> file (usually inside your %UserProfile%)and add the following line: <strong>SASS_BINARY_DIR=C:\Users\*****\AppData\Roaming\sass-binary\</strong></p><p>4. Go to user environment variables:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*enj90NKKkKVF98EPzDB2HQ.png" /></figure><p>5. Add a new variable:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*Bq8DXOtlD8G7DQ7Wjo6Y1A.jpeg" /></figure><p>6. Save the variable and you are ready! No npm install errors. Node-sass installation will recognize the path.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ca4b836db0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>