title: TypeError: Cannot read property 'node' of undefined
body: <p>I'm trying to install NPM.</p>
  
  <p>I first ran </p>
  
  <p><code>brew install node</code></p>
  
  <p>then</p>
  
  <pre><code>curl -O https://www.npmjs.org/install.sh
  </code></pre>
  
  <p>then</p>
  
  <pre><code>~ % sh install.sh
  </code></pre>
  
  <p>this is what I get    </p>
  
  <pre><code>tar=/usr/bin/tar
      version:
      bsdtar 2.8.3 - libarchive 2.8.3
      install npm@latest
      fetching: http://registry.npmjs.org/npm/-/npm-2.0.2.tgz
  
      /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/bin/read-package-json.js:18
            val = val[f]
                     ^
      TypeError: Cannot read property 'node' of undefined
          at /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/bin/read-package-json.js:18:16
          at Array.forEach (native)
          at /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/bin/read-package-json.js:17:11
          at Array.forEach (native)
          at /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/bin/read-package-json.js:14:22
          at /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/node_modules/read-package-json/read-json.js:51:40
          at final (/private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/node_modules/read-package-json/read-json.js:349:17)
          at then (/private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/node_modules/read-package-json/read-json.js:126:33)
          at /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/node_modules/read-package-json/read-json.js:266:40
          at evalmachine.&lt;anonymous&gt;:271:14
      0.10.32
  
      /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/bin/read-package-json.js:18
            val = val[f]
                     ^
      TypeError: Cannot read property 'node' of undefined
          at /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/bin/read-package-json.js:18:16
          at Array.forEach (native)
          at /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/bin/read-package-json.js:17:11
          at Array.forEach (native)
          at /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/bin/read-package-json.js:14:22
          at /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/node_modules/read-package-json/read-json.js:51:40
          at final (/private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/node_modules/read-package-json/read-json.js:349:17)
          at then (/private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/node_modules/read-package-json/read-json.js:126:33)
          at /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package/node_modules/read-package-json/read-json.js:266:40
          at evalmachine.&lt;anonymous&gt;:271:14
  
      &gt; npm@2.0.2 prepublish /private/var/folders/92/2l_j234x7n7bys14466b4dcr0000gn/T/npm.12852/package
      &gt; node bin/npm-cli.js prune --prefix=. --no-global &amp;&amp; rm -rf test/*/*/node_modules &amp;&amp; make -j8 doc
  
      make: Nothing to be done for `doc'.
      /usr/local/bin/npm -&gt; /usr/local/lib/node_modules/npm/bin/npm-cli.js
      npm@2.0.2 /usr/local/lib/node_modules/npm
      It worked
  </code></pre>
  
  <p>I know it says it worked... I'm just trying to find out what the error message means. And see what I can do to fix it.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks for the help!</p>