{"id":2093,"date":"2022-08-30T15:21:59","date_gmt":"2022-08-30T15:21:59","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/12\/25\/installing-karma-through-npm-times-out-on-phantomjs-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:21:59","modified_gmt":"2022-08-30T15:21:59","slug":"installing-karma-through-npm-times-out-on-phantomjs-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/installing-karma-through-npm-times-out-on-phantomjs-collection-of-common-programming-errors\/","title":{"rendered":"installing karma through npm times out on phantomjs-Collection of common programming errors"},"content":{"rendered":"<p>I am trying to install karma via npm, but it keeps timing out. I downloaded the file with curl and installed phantomjs manually, but npm still throws an error when I try to install karma. I tried copying the file into the path that npm says it&#8217;s saving to, but that doesn&#8217;t work (running the install also deletes the directory that I create).<\/p>\n<p>This is what I&#8217;m running:<\/p>\n<pre><code>sudo npm install -g karma\n<\/code><\/pre>\n<p>This is what&#8217;s happening:<\/p>\n<pre><code>&gt; phantomjs@1.9.1-0 install \/usr\/local\/lib\/node_modules\/karma-phantomjs-launcher\/node_modules\/phantomjs\n&gt; node install.js\n\nDownloading http:\/\/phantomjs.googlecode.com\/files\/phantomjs-1.9.1-linux-x86_64.tar.bz2\nSaving to \/usr\/local\/lib\/node_modules\/karma-phantomjs-launcher\/node_modules\/phantomjs\/phantomjs\/phantomjs-1.9.1-linux-x86_64.tar.bz2\n\nevents.js:77\n        throw er; \/\/ Unhandled 'error' event\n              ^\nError: connect ETIMEDOUT\n    at errnoException (net.js:947:11)\n    at Object.afterConnect [as oncomplete] (net.js:938:19)\nnpm ERR! weird error 8\nnpm ERR! not ok code 0\n<\/code><\/pre>\n<p>I find it odd that it&#8217;s still trying to install phantomjs even after I installed it manually on my system. What can I do in order to make this work, I have the file downloaded, and even installed it, and it appears to be working. For some reason, npm just doesn&#8217;t like it.<\/p>\n<ol>\n<li>\n<p>Fixed.. it was necessary to do <code>sudo n stable<\/code> instead of <code>sudo n latest<\/code> &#8211; apparently cannot install karma with the latest version of node.js<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-12-25 11:07:01. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I am trying to install karma via npm, but it keeps timing out. I downloaded the file with curl and installed phantomjs manually, but npm still throws an error when I try to install karma. I tried copying the file into the path that npm says it&#8217;s saving to, but that doesn&#8217;t work (running the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2093","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2093"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2093\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}