{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/9199","labels_url":"https://api.github.com/repos/npm/npm/issues/9199/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/9199/comments","events_url":"https://api.github.com/repos/npm/npm/issues/9199/events","html_url":"https://github.com/npm/npm/issues/9199","id":99626920,"number":9199,"title":"Mistyped package name causes internal error on npm@3 install","user":{"login":"brycekbargar","id":11711300,"avatar_url":"https://avatars.githubusercontent.com/u/11711300?v=3","gravatar_id":"","url":"https://api.github.com/users/brycekbargar","html_url":"https://github.com/brycekbargar","followers_url":"https://api.github.com/users/brycekbargar/followers","following_url":"https://api.github.com/users/brycekbargar/following{/other_user}","gists_url":"https://api.github.com/users/brycekbargar/gists{/gist_id}","starred_url":"https://api.github.com/users/brycekbargar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brycekbargar/subscriptions","organizations_url":"https://api.github.com/users/brycekbargar/orgs","repos_url":"https://api.github.com/users/brycekbargar/repos","events_url":"https://api.github.com/users/brycekbargar/events{/privacy}","received_events_url":"https://api.github.com/users/brycekbargar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-07T10:56:39Z","updated_at":"2015-08-09T03:04:25Z","closed_at":"2015-08-09T03:04:25Z","body":"I ran `npm install --save-dev istanbul mocha chai` this morning, but was greeted with this error instead of a nice testing environment.\r\n\r\n```\r\n0 info it worked if it ends with ok\r\n1 verbose cli [ 'node',\r\n1 verbose cli   '/usr/local/bin/npm',\r\n1 verbose cli   'install',\r\n1 verbose cli   '--save-dev',\r\n1 verbose cli   'instanbul',\r\n1 verbose cli   'mocha',\r\n1 verbose cli   'chai' ]\r\n2 info using npm@3.1.3\r\n3 info using node@v0.12.7\r\n4 verbose node symlink /usr/local/bin/node\r\n5 silly loadCurrentTree Starting\r\n6 silly install loadCurrentTree\r\n7 silly install readLocalPackageData\r\n8 silly fetchPackageMetaData instanbul\r\n9 silly fetchPackageMetaData mocha\r\n10 silly fetchPackageMetaData chai\r\n11 silly fetchNamedPackageData instanbul\r\n12 silly mapToRegistry name instanbul\r\n13 silly mapToRegistry using default registry\r\n14 silly mapToRegistry registry https://registry.npmjs.org/\r\n15 silly mapToRegistry uri https://registry.npmjs.org/instanbul\r\n16 silly fetchNamedPackageData mocha\r\n17 silly mapToRegistry name mocha\r\n18 silly mapToRegistry using default registry\r\n19 silly mapToRegistry registry https://registry.npmjs.org/\r\n20 silly mapToRegistry uri https://registry.npmjs.org/mocha\r\n21 silly fetchNamedPackageData chai\r\n22 silly mapToRegistry name chai\r\n23 silly mapToRegistry using default registry\r\n24 silly mapToRegistry registry https://registry.npmjs.org/\r\n25 silly mapToRegistry uri https://registry.npmjs.org/chai\r\n26 verbose request uri https://registry.npmjs.org/instanbul\r\n27 verbose request no auth needed\r\n28 info attempt registry request try #1 at 05:51:04\r\n29 verbose request id 5806dd3dddd7fac1\r\n30 http request GET https://registry.npmjs.org/instanbul\r\n31 verbose request uri https://registry.npmjs.org/chai\r\n32 verbose request no auth needed\r\n33 info attempt registry request try #1 at 05:51:04\r\n34 verbose etag \"EOLXXR8HQWB57DAMZZ4V6GW5S\"\r\n35 http request GET https://registry.npmjs.org/chai\r\n36 verbose request uri https://registry.npmjs.org/mocha\r\n37 verbose request no auth needed\r\n38 info attempt registry request try #1 at 05:51:04\r\n39 verbose etag \"4230GOE58P1PHFUTCV9PVDYE9\"\r\n40 http request GET https://registry.npmjs.org/mocha\r\n41 http 304 https://registry.npmjs.org/chai\r\n42 silly get cb [ 304,\r\n42 silly get   { date: 'Fri, 07 Aug 2015 10:51:04 GMT',\r\n42 silly get     via: '1.1 varnish',\r\n42 silly get     'cache-control': 'max-age=60',\r\n42 silly get     etag: '\"EOLXXR8HQWB57DAMZZ4V6GW5S\"',\r\n42 silly get     age: '30',\r\n42 silly get     connection: 'keep-alive',\r\n42 silly get     'x-served-by': 'cache-dfw1826-DFW',\r\n42 silly get     'x-cache': 'HIT',\r\n42 silly get     'x-cache-hits': '1',\r\n42 silly get     'x-timer': 'S1438944664.390440,VS0,VE0',\r\n42 silly get     vary: 'Accept' } ]\r\n43 verbose etag https://registry.npmjs.org/chai from cache\r\n44 verbose get saving chai to /Users/bryce/.npm/registry.npmjs.org/chai/.cache.json\r\n45 http 304 https://registry.npmjs.org/mocha\r\n46 silly get cb [ 304,\r\n46 silly get   { date: 'Fri, 07 Aug 2015 10:51:04 GMT',\r\n46 silly get     via: '1.1 varnish',\r\n46 silly get     'cache-control': 'max-age=60',\r\n46 silly get     etag: '\"4230GOE58P1PHFUTCV9PVDYE9\"',\r\n46 silly get     age: '30',\r\n46 silly get     connection: 'keep-alive',\r\n46 silly get     'x-served-by': 'cache-dfw1824-DFW',\r\n46 silly get     'x-cache': 'HIT',\r\n46 silly get     'x-cache-hits': '1',\r\n46 silly get     'x-timer': 'S1438944664.389682,VS0,VE0',\r\n46 silly get     vary: 'Accept' } ]\r\n47 verbose etag https://registry.npmjs.org/mocha from cache\r\n48 verbose get saving mocha to /Users/bryce/.npm/registry.npmjs.org/mocha/.cache.json\r\n49 http 404 https://registry.npmjs.org/instanbul\r\n50 verbose headers { 'cache-control': 'max-age=0',\r\n50 verbose headers   'transfer-encoding': 'chunked',\r\n50 verbose headers   'accept-ranges': 'bytes',\r\n50 verbose headers   date: 'Fri, 07 Aug 2015 10:51:04 GMT',\r\n50 verbose headers   via: '1.1 varnish',\r\n50 verbose headers   age: '0',\r\n50 verbose headers   connection: 'keep-alive',\r\n50 verbose headers   'x-served-by': 'cache-dfw1822-DFW',\r\n50 verbose headers   'x-cache': 'MISS',\r\n50 verbose headers   'x-cache-hits': '0',\r\n50 verbose headers   'x-timer': 'S1438944664.356024,VS0,VE77' }\r\n51 silly get cb [ 404,\r\n51 silly get   { 'cache-control': 'max-age=0',\r\n51 silly get     'transfer-encoding': 'chunked',\r\n51 silly get     'accept-ranges': 'bytes',\r\n51 silly get     date: 'Fri, 07 Aug 2015 10:51:04 GMT',\r\n51 silly get     via: '1.1 varnish',\r\n51 silly get     age: '0',\r\n51 silly get     connection: 'keep-alive',\r\n51 silly get     'x-served-by': 'cache-dfw1822-DFW',\r\n51 silly get     'x-cache': 'MISS',\r\n51 silly get     'x-cache-hits': '0',\r\n51 silly get     'x-timer': 'S1438944664.356024,VS0,VE77' } ]\r\n52 verbose stack Error: Argument #1: Expected error but got string\r\n52 verbose stack     at addRequestedAndFinish (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:63:5)\r\n52 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/iferr/index.js:11:16\r\n52 verbose stack     at /usr/local/lib/node_modules/npm/lib/utils/pulse-till-done.js:19:8\r\n52 verbose stack     at /usr/local/lib/node_modules/npm/lib/cache/caching-client.js:160:20\r\n52 verbose stack     at /usr/local/lib/node_modules/npm/lib/cache/caching-client.js:53:8\r\n52 verbose stack     at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:17:25)\r\n52 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:87:10\r\n52 verbose stack     at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:17:25)\r\n52 verbose stack     at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:211:14)\r\n52 verbose stack     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:170:14)\r\n53 verbose cwd /Users/bryce/Documents/Repos/katas/codekata.com/kata02-karate-chop/node/15_08_07\r\n54 error Darwin 14.3.0\r\n55 error argv \"node\" \"/usr/local/bin/npm\" \"install\" \"--save-dev\" \"instanbul\" \"mocha\" \"chai\"\r\n56 error node v0.12.7\r\n57 error npm  v3.1.3\r\n58 error code EINVALIDTYPE\r\n59 error typeerror Error: Argument #1: Expected error but got string\r\n59 error typeerror     at addRequestedAndFinish (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:63:5)\r\n59 error typeerror     at /usr/local/lib/node_modules/npm/node_modules/iferr/index.js:11:16\r\n59 error typeerror     at /usr/local/lib/node_modules/npm/lib/utils/pulse-till-done.js:19:8\r\n59 error typeerror     at /usr/local/lib/node_modules/npm/lib/cache/caching-client.js:160:20\r\n59 error typeerror     at /usr/local/lib/node_modules/npm/lib/cache/caching-client.js:53:8\r\n59 error typeerror     at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:17:25)\r\n59 error typeerror     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:87:10\r\n59 error typeerror     at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:17:25)\r\n59 error typeerror     at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:211:14)\r\n59 error typeerror     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:170:14)\r\n59 error typeerror This is an error with npm itself. Please report this error at:\r\n59 error typeerror     <http://github.com/npm/npm/issues>\r\n60 verbose exit [ 1, true ]\r\n```\r\n\r\nhttps://github.com/gotwarlost/istanbul/issues/421\r\nI filed an issue with istanbul since the package 404ing seems to be the root cause, but npm should fail more gracefully/informatively."},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/129098024","html_url":"https://github.com/npm/npm/issues/9199#issuecomment-129098024","issue_url":"https://api.github.com/repos/npm/npm/issues/9199","id":129098024,"user":{"login":"brycekbargar","id":11711300,"avatar_url":"https://avatars.githubusercontent.com/u/11711300?v=3","gravatar_id":"","url":"https://api.github.com/users/brycekbargar","html_url":"https://github.com/brycekbargar","followers_url":"https://api.github.com/users/brycekbargar/followers","following_url":"https://api.github.com/users/brycekbargar/following{/other_user}","gists_url":"https://api.github.com/users/brycekbargar/gists{/gist_id}","starred_url":"https://api.github.com/users/brycekbargar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brycekbargar/subscriptions","organizations_url":"https://api.github.com/users/brycekbargar/orgs","repos_url":"https://api.github.com/users/brycekbargar/repos","events_url":"https://api.github.com/users/brycekbargar/events{/privacy}","received_events_url":"https://api.github.com/users/brycekbargar/received_events","type":"User","site_admin":false},"created_at":"2015-08-09T03:04:25Z","updated_at":"2015-08-09T03:04:25Z","body":"This has been fixed in 3.2.2. It is back to `npm ERR! 404 Not Found`."}}