title: How can I install NODE_MODULE_VERSION 46
body: <p>How can I install a Node.js version using NODE_MODULE_VERSION 46? I keep running into a NODE_MODULE_VERSION mismatch, and recompiling hasn't helped so switching node versions might be easier.</p>
  
  <p>Basically, I keep coming across this:</p>
  
  <pre><code>Warning: The module '/home/cwaugh/workspaces/myproject/build/Release/addon.node'
  was compiled against a different Node.js version using
  NODE_MODULE_VERSION 46. This version of Node.js requires
  NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
  the module (for instance, using `npm rebuild` or `npm install`). Use --force to continue.
  </code></pre>
  
  <p>So far, I've tried using <code>n</code> to change to different versions (one of my dependencies requires 4.9.1 or below), but that doesn't seem to change the NODE_MODULE_VERSION as recognized by the warning.</p>
  
  <p>I've also tried recompiling:</p>
  
  <ul>
  <li>I've tried deleting node_modules and running <code>npm install</code> again. (this error looks like it's coming from the project root, but it never worked for anything in the node_modules folder either)</li>
  <li><code>node-gyp configure --target=4.9.1 &amp;&amp; node-gyp build --target=4.9.1</code>. I got the idea from <a href="https://stackoverflow.com/questions/54565777/node-gyp-compiling-against-wrong-node-module-version">here</a>, and hoped I'd have better luck than mxcd.</li>
  <li><code>node-pre-gyp rebuild</code>. I saw <a href="https://stackoverflow.com/questions/50805005/node-module-version-46-this-version-of-node-js-requires-node-module-version-64">this</a>, and thought it might work for me.</li>
  </ul>
  
  <p>This works on another, older computer running a vagrant image. Unfortunately, vagrant isn't working on the new computer either, so I've been trying from scratch. Sometimes, I wonder if it's because I'm using Ubuntu 18.04. The server's can't seem to go past 16.04 when they run our docker image.</p>