title: gyp: binding.gyp not found
body: <p>I am trying to install the necessary modules for running my web application. I am getting the following error while running <code>$npm install</code> :</p>
  <pre><code>john@mylaptop frontend % npm install              
  
  &gt; fsevents@2.3.2 install /Users/john/workspace/myproject/frontend/node_modules/watchpack/node_modules/fsevents
  &gt; node-gyp rebuild
  
  gyp: binding.gyp not found (cwd: /Users/john/workspace/myproject/frontend/node_modules/watchpack/node_modules/fsevents) while trying to load binding.gyp
  gyp ERR! configure error 
  gyp ERR! stack Error: `gyp` failed with exit code: 1
  gyp ERR! stack     at ChildProcess.onCpExit (/Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
  gyp ERR! stack     at emitTwo (events.js:106:13)
  gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
  gyp ERR! System Darwin 21.3.0
  gyp ERR! command &quot;/Users/john/.nvm/versions/node/v6.11.0/bin/node&quot; &quot;/Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js&quot; &quot;rebuild&quot;
  gyp ERR! cwd /Users/john/workspace/myproject/frontend/node_modules/watchpack/node_modules/fsevents
  gyp ERR! node -v v6.11.0
  gyp ERR! node-gyp -v v3.4.0
  gyp ERR! not ok 
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/watchpack/node_modules/fsevents):
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 install: `node-gyp rebuild`
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
  john@mylaptop frontend % node-gyp rebuild --verbose
  gyp info it worked if it ends with ok
  gyp verb cli [ '/Users/john/.nvm/versions/node/v6.11.0/bin/node',
  gyp verb cli   '/Users/john/.nvm/versions/node/v6.11.0/bin/node-gyp',
  gyp verb cli   'rebuild',
  gyp verb cli   '--verbose' ]
  gyp info using node-gyp@8.4.1
  gyp info using node@6.11.0 | darwin | x64
  gyp verb command rebuild []
  gyp verb command clean []
  gyp verb clean removing &quot;build&quot; directory
  gyp verb command configure []
  gyp ERR! UNCAUGHT EXCEPTION 
  gyp ERR! stack /Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/node-gyp/lib/create-config-gypi.js:18
  gyp ERR! stack async function getBaseConfigGypi ({ gyp, nodeDir }) {
  gyp ERR! stack       ^^^^^^^^
  gyp ERR! stack SyntaxError: Unexpected token function
  gyp ERR! stack     at createScript (vm.js:56:10)
  gyp ERR! stack     at Object.runInThisContext (vm.js:97:10)
  gyp ERR! stack     at Module._compile (module.js:542:28)
  gyp ERR! stack     at Object.Module._extensions..js (module.js:579:10)
  gyp ERR! stack     at Module.load (module.js:487:32)
  gyp ERR! stack     at tryModuleLoad (module.js:446:12)
  gyp ERR! stack     at Function.Module._load (module.js:438:3)
  gyp ERR! stack     at Module.require (module.js:497:17)
  gyp ERR! stack     at require (internal/module.js:20:19)
  gyp ERR! stack     at Object.&lt;anonymous&gt; (/Users/john/.nvm/versions/node/v6.11.0/lib/node_modules/node-gyp/lib/configure.js:10:26)
  gyp ERR! System Darwin 21.3.0
  gyp ERR! command &quot;/Users/john/.nvm/versions/node/v6.11.0/bin/node&quot; &quot;/Users/john/.nvm/versions/node/v6.11.0/bin/node-gyp&quot; &quot;rebuild&quot; &quot;--verbose&quot;
  gyp ERR! cwd /Users/john/workspace/myproject/frontend
  gyp ERR! node -v v6.11.0
  gyp ERR! node-gyp -v v8.4.1
  gyp ERR! Node-gyp failed to build your package.
  gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
  </code></pre>
  <p>This is the node version I am using :</p>
  <pre><code>john@mylaptop frontend % npm version
  { frontend: '0.0.0',
    npm: '3.10.10',
    ares: '1.10.1-DEV',
    http_parser: '2.7.0',
    icu: '58.2',
    modules: '48',
    node: '6.11.0',
    openssl: '1.0.2k',
    uv: '1.11.0',
    v8: '5.1.281.102',
    zlib: '1.2.11' }
  </code></pre>
  <p>I don't want to upgrade npm or node versions for <a href="https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3" rel="nofollow noreferrer">compatibility reasons</a> with angular 4.4.6. Any help please. node was installed via nvm and not with brew.</p>