{"id":8606,"date":"2016-01-27T05:18:13","date_gmt":"2016-01-27T05:18:13","guid":{"rendered":"https:\/\/wp.okra.host\/article\/changing-node-versions\/"},"modified":"2021-03-07T14:34:00","modified_gmt":"2021-03-07T13:34:00","slug":"changing-node-versions","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/changing-node-versions\/","title":{"rendered":"Changing Node Versions"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p>Platforms <a href=\"https:\/\/kb.okra.host\/de\/platform\/determining-platform-version\/\">v6.5+<\/a> and beyond support multiple Node versions that may be installed using <a href=\"https:\/\/github.com\/creationix\/nvm\">nvm<\/a>.<\/p>\n<h2 id=\"usage\" >Verwendung<\/h2>\n<h3 id=\"listing\" >Listing<\/h3>\n<p style=\"text-align: left\">nvm is provided automatically. First, to list available node interpreters, execute <code>nvm ls<\/code>\u00a0from the <a href=\"https:\/\/kb.okra.host\/de\/terminal\/accessing-terminal\/\">Terminal<\/a>:<\/p>\n<pre><code>$ nvm ls\r\n v4.2.4\r\n v5.5.0\r\n-&gt; system\r\nnode -&gt; stable (-&gt; v5.5.0) (default)\r\nstable -&gt; 5.5 (-&gt; v5.5.0) (default)\r\niojs -&gt; N\/A (default)<\/code><\/pre>\n<p>system is the system default. In additional, both v4.2.4 and v5.5.0 have been installed.<\/p>\n<p>Use <code>nvm ls-remote<\/code> to show all remote\u00a0Node packages available for installation on your account.<\/p>\n<h3 id=\"installing\" >Installing<\/h3>\n<p>To install a Node interpreter, simply run <code>nvm install <em>&lt;version&gt;<\/em><\/code>, where <em>&lt;version&gt;<\/em> is a remotely-available version from <code>nvm ls-remote<\/code><\/p>\n<pre><code>$ nvm install v4.5.1\r\n Downloading https:\/\/nodejs.org\/dist\/v5.4.1\/node-v5.4.1-linux-x64.tar.xz...\r\n ######################################################################## 100.0%\r\n WARNING: checksums are currently disabled for node.js v4.0 and later\r\n Now using node v5.4.1 (npm v3.3.12)\r\n<\/code><\/pre>\n<h3 id=\"using\" >Using<\/h3>\n<p>Switch Node interpreters with <code>nvm use <em>&lt;version&gt;<\/em><\/code>, where <em>&lt;version&gt;<\/em> is a locally installed Node interpreter.<\/p>\n<pre>$ nvm use 5.4.1\r\nNow using node v5.4.1 (npm v3.3.12)\r\n$ node -v\r\nv5.4.1<\/pre>\n<p><code>nvm alias default <em>&lt;version&gt;<\/em><\/code> will save the <em>&lt;version&gt;<\/em>\u00a0interpreter as your system default next time you login, no further activation required.<\/p>\n<h3 id=\"path\" >Path<\/h3>\n<p>Once you have settled on a Node interpreter, the absolute path may be discovered using <a href=\"http:\/\/apnscp.com\/linux-man\/man1\/which.1.html\">which<\/a>:<\/p>\n<pre>$ which node\r\n~\/.nvm\/versions\/node\/v5.4.1\/bin\/node<\/pre>\n<p>Be sure to expand ~ to your <a href=\"https:\/\/kb.okra.host\/de\/platform\/home-directory-location\/\">home directory<\/a>. This location\u00a0be used\u00a0with\u00a0<a href=\"https:\/\/kb.okra.host\/de\/guides\/running-node-js\/\">Passagier<\/a> via <code>PassengerNodejs<\/code> to use a different Node, other than the system default,\u00a0to handle requests.<\/p>\n<h2 id=\"see-also\" >Siehe auch<\/h2>\n<ul>\n<li><a href=\"https:\/\/github.com\/creationix\/nvm\/blob\/master\/README.markdown\">nvm documentation<\/a>\u00a0(github.org)<\/li>\n<li>KB: <a href=\"https:\/\/kb.okra.host\/de\/guides\/running-node-js\/\">Node.js ausf\u00fchren<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Overview Platforms v6.5+ and beyond support multiple Node versions that may be installed using nvm. Usage Listing nvm is provided automatically. First, to list available node interpreters, execute nvm ls\u00a0from the terminal: $ nvm ls v4.2.4 v5.5.0 -&gt; system node -&gt; stable (-&gt; v5.5.0) (default) stable -&gt; 5.5 (-&gt; v5.5.0)&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[62],"ht-kb-tag":[],"class_list":["post-8606","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-node"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8606"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8606\/revisions"}],"predecessor-version":[{"id":8607,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8606\/revisions\/8607"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8606"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8606"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}