{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/14672","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/14672/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/14672/comments","events_url":"https://api.github.com/repos/npm/npm/issues/14672/events","html_url":"https://github.com/npm/npm/issues/14672","id":190516609,"number":14672,"title":"Npm fails to search packages","user":{"login":"kricir","id":1328585,"avatar_url":"https://avatars.githubusercontent.com/u/1328585?v=3","gravatar_id":"","url":"https://api.github.com/users/kricir","html_url":"https://github.com/kricir","followers_url":"https://api.github.com/users/kricir/followers","following_url":"https://api.github.com/users/kricir/following{/other_user}","gists_url":"https://api.github.com/users/kricir/gists{/gist_id}","starred_url":"https://api.github.com/users/kricir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kricir/subscriptions","organizations_url":"https://api.github.com/users/kricir/orgs","repos_url":"https://api.github.com/users/kricir/repos","events_url":"https://api.github.com/users/kricir/events{/privacy}","received_events_url":"https://api.github.com/users/kricir/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-19T19:56:47Z","updated_at":"2016-11-19T20:04:45Z","closed_at":"2016-11-19T20:04:45Z","body":"#### I'm opening this issue because:\r\n\r\n  - [ ] npm is crashing.\r\n  - [ ] npm is producing an incorrect install.\r\n  - [x] npm is doing something I don't understand.\r\n  - [ ] Other (_see below for feature requests_):\r\n\r\n#### What's going wrong?\r\n\r\nI am trying to search npm packages, upon trying \"npm search php\"...\r\n\r\nError Returned...\r\nnpm ERR! argv \"/usr/local/bin/node\" \"/usr/local/bin/npm\" \"search\" \"php\"\r\nnpm ERR! node v6.9.1\r\nnpm ERR! npm  v3.10.8\r\n\r\nnpm ERR! Cannot read property '_updated' of undefined\r\nnpm ERR! \r\nnpm ERR! If you need help, you may report this error at:\r\nnpm ERR!     <https://github.com/npm/npm/issues>\r\nnpm WARN Building the local index for the first time, please be patient\r\n\r\n<--- Last few GCs --->\r\n\r\n   46628 ms: Mark-sweep 1066.2 (1386.5) -> 1040.2 (1366.1) MB, 883.7 / 0.0 ms [allocation failure] [GC in old space requested].\r\n   47532 ms: Mark-sweep 1040.2 (1366.1) -> 1040.1 (1326.1) MB, 904.0 / 0.0 ms [last resort gc].\r\n   48501 ms: Mark-sweep 1040.1 (1326.1) -> 1040.1 (1320.1) MB, 969.2 / 0.0 ms [last resort gc].\r\n\r\n\r\n<--- JS stacktrace --->\r\n\r\n==== JS stack trace =========================================\r\n\r\nSecurity context: 0x1db4861cfb51 <JS Object>\r\n    1: fromString(aka fromString) [buffer.js:199] [pc=0x1ef3520ac490] (this=0x1db486104381 <undefined>,string=0x2082377d57c9 <Very long string[217886406]>,encoding=0x1db4861dd361 <String[4]: utf8>)\r\n    2: from [buffer.js:99] [pc=0x1ef35205c742] (this=0x6077cfaa0f1 <JS Function Buffer (SharedFunctionInfo 0x20a31cff6181)>,value=0x2082377d57c9 <Very long string[217886406]>,encodingOrOffset=0x1db48...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [/usr/local/bin/node]\r\n 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node]\r\n 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]\r\n 4: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/local/bin/node]\r\n 5: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [/usr/local/bin/node]\r\n 6: v8::String::WriteUtf8(char*, int, int*, int) const [/usr/local/bin/node]\r\n 7: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [/usr/local/bin/node]\r\n 8: node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) [/usr/local/bin/node]\r\n 9: node::Buffer::CreateFromString(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]\r\n10: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/local/bin/node]\r\n11: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>) [/usr/local/bin/node]\r\n12: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]\r\n13: 0x1ef351b092a7\r\nAbort trap: 6\r\n\r\n\r\nLog file....\r\n0 info it worked if it ends with ok\r\n1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'search', 'php' ]\r\n2 info using npm@3.10.8\r\n3 info using node@v6.9.1\r\n4 silly mapToRegistry name -/all\r\n5 silly mapToRegistry using default registry\r\n6 silly mapToRegistry registry https://registry.npmjs.org/\r\n7 silly mapToRegistry data Result {\r\n7 silly mapToRegistry   raw: '-/all',\r\n7 silly mapToRegistry   scope: null,\r\n7 silly mapToRegistry   escapedName: null,\r\n7 silly mapToRegistry   name: null,\r\n7 silly mapToRegistry   rawSpec: '-/all',\r\n7 silly mapToRegistry   spec: '-/all',\r\n7 silly mapToRegistry   type: 'local' }\r\n8 silly mapToRegistry uri https://registry.npmjs.org/-/all\r\n9 info updateIndex /Users/richardkreitel/.npm/registry.npmjs.org/-/all/.cache.json\r\n10 verbose correctMkdir /Users/richardkreitel/.npm correctMkdir not in flight; initializing\r\n11 verbose stack TypeError: Cannot read property '_updated' of undefined\r\n11 verbose stack     at /usr/local/lib/node_modules/npm/lib/cache/update-index.js:61:26\r\n11 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:233:18\r\n11 verbose stack     at FSReqWrap.oncomplete (fs.js:123:15)\r\n12 verbose cwd /Users/richardkreitel/Library/Mobile Documents/com~apple~CloudDocs/Sites/Right Syntax/Site/Wordpress/wp-content/themes/rsyntax\r\n13 error Darwin 16.1.0\r\n14 error argv \"/usr/local/bin/node\" \"/usr/local/bin/npm\" \"search\" \"php\"\r\n15 error node v6.9.1\r\n16 error npm  v3.10.8\r\n17 error Cannot read property '_updated' of undefined\r\n18 error If you need help, you may report this error at:\r\n18 error     <https://github.com/npm/npm/issues>\r\n19 verbose exit [ 1, true ]\r\n\r\n#### How can the CLI team reproduce the problem?\r\n\r\n$ npm search php\r\n\r\n### supporting information:\r\n\r\n - `npm -v` prints:  3.10.8\r\n - `node -v` prints: v6.9.1\r\n - `npm config get registry` prints: https://registry.npmjs.org/\r\n - Windows, OS X/macOS, or Linux?: OS X\r\n - Network issues:\r\n   - Geographic location where npm was run:\r\n   - [ ] I use a proxy to connect to the npm registry.\r\n   - [ ] I use a proxy to connect to the web.\r\n   - [ ] I use a proxy when downloading Git repos.\r\n   - [ ] I access the npm registry via a VPN\r\n   - [ ] I don't use a proxy, but have limited or unreliable internet access.\r\n - Container:\r\n   - [x] I develop using Vagrant on Windows.\r\n   - [x] I develop using Vagrant on OS X or Linux.\r\n   - [ ] I develop / deploy using Docker.\r\n   - [ ] I deploy to a PaaS (Triton, Heroku).\r\n\r\n<!--\r\n    Thank you for contributing to npm! Please review this checklist\r\n    before submitting your issue.\r\n\r\n    - Please check if there's a solution in the troubleshooting wiki:\r\n      https://github.com/npm/npm/wiki/Troubleshooting\r\n\r\n    - Also ensure that your new issue conforms to npm's contribution guidelines:\r\n      https://github.com/npm/npm/wiki/Contributing-Guidelines\r\n\r\n    - Participation in this open source project is subject to the npm Code of Conduct:\r\n      https://www.npmjs.com/policies/conduct\r\n\r\n    For feature requests, delete the above and uncomment the section following this one. But first, review the existing feature requests\r\n    and make sure there isn't one that already describes the feature\r\n    you'd like to see added:\r\n      https://github.com/npm/npm/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+label%3Aalready-looked-at\r\n-->\r\n\r\n<!--\r\n\r\n#### What's the feature?\r\n\r\n#### What problem is the feature intended to solve?\r\n\r\n#### Is the absence of this feature blocking you or your team? If so, how?\r\n\r\n#### Is this feature similar to an existing feature in another tool?\r\n\r\n#### Is this a feature you're prepared to implement, with support from the npm CLI team?\r\n\r\n-->"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/261736168","html_url":"https://github.com/npm/npm/issues/14672#issuecomment-261736168","issue_url":"https://api.github.com/repos/npm/npm/issues/14672","id":261736168,"user":{"login":"KenanY","id":733364,"avatar_url":"https://avatars.githubusercontent.com/u/733364?v=3","gravatar_id":"","url":"https://api.github.com/users/KenanY","html_url":"https://github.com/KenanY","followers_url":"https://api.github.com/users/KenanY/followers","following_url":"https://api.github.com/users/KenanY/following{/other_user}","gists_url":"https://api.github.com/users/KenanY/gists{/gist_id}","starred_url":"https://api.github.com/users/KenanY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KenanY/subscriptions","organizations_url":"https://api.github.com/users/KenanY/orgs","repos_url":"https://api.github.com/users/KenanY/repos","events_url":"https://api.github.com/users/KenanY/events{/privacy}","received_events_url":"https://api.github.com/users/KenanY/received_events","type":"User","site_admin":false},"created_at":"2016-11-19T20:04:45Z","updated_at":"2016-11-19T20:04:45Z","body":"Already fixed in `npm@4.0.0`"}}
{"actor":{"display_login":"KenanY"}}