<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="http://jamessouth.me/blog/rss/xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>James Jackson-South</title>
    <link>http://jamessouth.me/blog/</link>
    <description>Microsoft MVP, Creator of ImageSharp, ImageProcessor and ResponsiveBP, Web developer, Lifter of heavy weights, and all round nice guy.</description>
    <generator>Articulate, blogging built on Umbraco</generator>
    <item>
      <guid isPermaLink="false">1111</guid>
      <link>http://jamessouth.me/archive/filepath-too-long/</link>
      <category>System.String[]</category>
      <title>Filepath too long?</title>
      <description>&lt;p&gt;I thought I'd write this post as a reminder to myself and as a helper for anyone daft enough to try to use Node on a Windows machine.&lt;/p&gt;
&lt;p&gt;Node has a mental system for managing packages which involves deeply nesting dependencies in the &lt;code&gt;node_modules&lt;/code&gt; folder. This can lead to all sorts of problems on Windows machines like making the &lt;code&gt;--watch&lt;/code&gt; overload for Jekyll die on its ass.&lt;/p&gt;
&lt;p&gt;You can't even delete the damn thing properly due to Windows path constraints. It's really annoying to say the least but at least they know about &lt;a href="https://github.com/npm/npm/issues/3697"&gt;it&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here's a quick method I use to remove the folder when I need to.&lt;/p&gt;
&lt;p&gt;Open a command prompt or whatever your shell tool of choice is, navigate to the parent folder of the &lt;code&gt;node_modules&lt;/code&gt; folder and type in the following commands:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mkdir foo
robocopy foo node_modules /MIR
del foo
del node_modules
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This command uses the &lt;a href="http://technet.microsoft.com/en-us/library/cc733145.aspx"&gt;robocopy utility&lt;/a&gt; and the /MIR &amp;quot;mirror&amp;quot; flag to mirror the empty &lt;code&gt;foo&lt;/code&gt;  directory to the &lt;code&gt;node_modules&lt;/code&gt; folder emptying it out. You can then delete both directories.&lt;/p&gt;
&lt;p&gt;Voilà :)&lt;/p&gt;
</description>
      <pubDate>Tue, 05 Aug 2014 13:57:28 Z</pubDate>
      <a10:updated>2014-08-05T13:57:28Z</a10:updated>
    </item>
  </channel>
</rss>