Fix broken ‘node-gyp’ issue for Mac OS

<p>This issue is usually caused because a&nbsp;<code>node-gyp</code>&nbsp;config file called&nbsp;<code>common.gypi</code>&nbsp;is not set up for your current Mac OS version.</p> <p>It often times comes accompanied with an error message like:</p> <pre> fatal error: &#39;utility&#39; file not found #include &lt;utility&gt;</pre> <p>Another usual fix is to reinstall XCode&rsquo;s command-line tools with:</p> <pre> $ xcode-select --install</pre> <p>Just for context, this issue usually happens after upgrading your OS of if you use&nbsp;<code>nvm</code>&nbsp;and are using a newly installed&nbsp;<strong>NodeJs</strong>&nbsp;version.</p> <p>If your project has any complex dependencies that rely heavily on native libraries this solution might not be for you.</p> <p>If the most complex&nbsp;<code>node-gyp</code>-related dependency you have in your project is something common like&nbsp;<code>node-sass</code>&nbsp;then this is usually the fix you need.</p> <p>You&rsquo;ll need to find and edit the&nbsp;<code>common.gypi</code>&nbsp;file for the&nbsp;<strong>NodeJs</strong>&nbsp;version you&rsquo;re using. You&rsquo;ll usually find it in a path like:</p> <p><a href="https://medium.com/macoclock/fix-broken-node-gyp-issue-for-mac-os-596e4a8bcffd"><strong>Read More</strong></a></p>
Tags: Node gyp