title: firebase-tools fails to load via terminal install on macOS
body: <p><strong>Trying to install firebase-tool for CLI.  Getting failures.</strong></p>
  
  <p>running on macOS</p>
  
  <p>I have seen suggestions like the following ...</p>
  
  <p><a href="https://stackoverflow.com/questions/48466020/troubling-with-installing-firebase-tools">Troubling with installing firebase-tools</a></p>
  
  <p>I tried $ sudo npm install -g firebase-tools</p>
  
  <p>Using 'sudo' gets past the error issues trying to access directories. but still crashes</p>
  
  <p><strong>The troubling bit seems to be this</strong> </p>
  
  <pre><code> node-pre-gyp ERR! Tried to download(undefined):       https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.4.1/node-v57-darwin-x64.tar.gz 
  </code></pre>
  
  <p>I can put the above URL in a browser and it will download the tar.</p>
  
  <p><strong>I also have access problem even if I use 'sudo'</strong></p>
  
  <pre><code> gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/build'
  </code></pre>
  
  <p>Trying to understand how to get past the errors to install firebase-tools,  Also some suggestions say to install node via nvm.   Found <a href="http://nodesource.com/blog/installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu/" rel="noreferrer">tutorial on nvm</a>,  anyone know what doing this install will to to projects I already have on my machine.  e.g confusion finding correct node.js, or need to reinstall everything that I already installed using my current node install?</p>
  
  <p>The full error messages are ...</p>
  
  <pre><code>  sudo npm install -g firebase-tools
    Password:
    npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
    /usr/local/bin/firebase -&gt; /usr/local/lib/node_modules/firebase-     tools/bin/firebase
  
    &gt; grpc@1.4.1 install /usr/local/lib/node_modules/firebase-   tools/node_modules/grpc
    &gt; node-pre-gyp install --fallback-to-build --library=static_library
  
    node-pre-gyp ERR! Tried to download(undefined):    https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.4.1/node-    v57-darwin-x64.tar.gz 
   node-pre-gyp ERR! Pre-built binaries not found for grpc@1.4.1 and      node@8.9.4 (node-v57 ABI) (falling back to source compile with node-gyp) 
   gyp ERR! configure error 
   gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/build'
   gyp ERR! System Darwin 17.3.0
   gyp ERR! command "/usr/local/bin/node"  "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"  "configure" "--fallback-to-build" "--library=static_library" "-- module=/usr/local/lib/node_modules/firebase- tools/node_modules/grpc/src/node/extension_binary/grpc_node.node" "-- module_name=grpc_node" "--module_path=/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary"
   gyp ERR! cwd /usr/local/lib/node_modules/firebase-tools/node_modules/grpc
   gyp ERR! node -v v8.9.4
   gyp ERR! node-gyp -v v3.6.2
   gyp ERR! not ok 
   node-pre-gyp ERR! build error 
   node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node    /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure   --fallback-to-build --library=static_library --   module=/usr/local/lib/node_modules/firebase- tools/node_modules/grpc/src/node/extension_binary/grpc_node.node -- module_name=grpc_node --module_path=/usr/local/lib/node_modules/firebase- tools/node_modules/grpc/src/node/extension_binary' (1)
   node-pre-gyp ERR! stack     at ChildProcess.&lt;anonymous&gt;   (/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/node_modules/node-  pre-gyp/lib/util/compile.js:83:29)
   node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
   node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
   node-pre-gyp ERR! stack     at maybeClose   (internal/child_process.js:925:16)
   node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
   node-pre-gyp ERR! System Darwin 17.3.0
   node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/firebase-   tools/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-  to-build" "--library=static_library"
   node-pre-gyp ERR! cwd /usr/local/lib/node_modules/firebase-    tools/node_modules/grpc
   node-pre-gyp ERR! node -v v8.9.4
   node-pre-gyp ERR! node-pre-gyp -v v0.6.36
   node-pre-gyp ERR! not ok 
   Failed to execute '/usr/local/bin/node   /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure  --fallback-to-build --library=static_library -- module=/usr/local/lib/node_modules/firebase-  tools/node_modules/grpc/src/node/extension_binary/grpc_node.node -- module_name=grpc_node --module_path=/usr/local/lib/node_modules/firebase- tools/node_modules/grpc/src/node/extension_binary' (1)
   npm WARN optional SKIPPING OPTIONAL DEPENDENCY: grpc@1.4.1 (node_modules/firebase-tools/node_modules/grpc):
   npm WARN optional SKIPPING OPTIONAL DEPENDENCY: grpc@1.4.1 install: `node-   pre-gyp install --fallback-to-build --library=static_library`
   npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
  
   + firebase-tools@3.17.4
   added 8 packages and updated 1 package in 37.194s
  </code></pre>
  
  <p><strong>I also tried to cd in to the node_modules directory and run the install from there as proposed in this post</strong> </p>
  
  <p><a href="https://stackoverflow.com/questions/45905493/firebase-tools-cannot-install-why">firebase-tools cannot install, why?</a></p>
  
  <p>The result is pages and pages of warning messages and finally an error</p>
  
  <pre><code> npm ERR! path /usr/local/lib/node_modules/firebase-tools/bin/firebase
   npm ERR! code ELOOP
   npm ERR! errno -62
   npm ERR! syscall chmod
   npm ERR! ELOOP: too many symbolic links encountered, chmod '/usr/local/lib/node_modules/firebase-tools/bin/firebase'
  </code></pre>