{"id":4068,"date":"2019-09-04T10:04:23","date_gmt":"2019-09-04T10:04:23","guid":{"rendered":"https:\/\/grodansparadis.com\/wordpress\/?p=4068"},"modified":"2019-09-04T10:04:23","modified_gmt":"2019-09-04T10:04:23","slug":"problems-running-node-red-as-a-service-remove-nvm","status":"publish","type":"post","link":"https:\/\/grodansparadis.com\/wordpress\/?p=4068","title":{"rendered":"Problems running #node-red as a service (remove nvm)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">On some  Raspberry Pi&#8217;s of mine I had problems  running node-js as a service as described <a href=\"https:\/\/nodered.org\/docs\/getting-started\/local\">here<\/a>. The only hint of a problem I got was a cryptic <em>&#8220;run nvm use latest\/*&#8221;<\/em> in the setup. I also remembered a post saying  that node-red does not like nvm. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So how to get rid of nvm you have it installed?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>sudo npm uninstall nvm<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">to remove it. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then remove the lines nvm add to your .bashrc file. They are located at the end of the file and look like this<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>export NVM_DIR=\"$HOME\/.nvm\"<br> [ -s \"$NVM_DIR\/nvm.sh\" ] &amp;&amp; . \"$NVM_DIR\/nvm.sh\"  # This loads nvm<br> [ -s \"$NVM_DIR\/bash_completion\" ] &amp;&amp; . \"$NVM_DIR\/bash_completion\"  # This loads nvm bash_completion<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now remove the nvm config folder<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>rm -rf ~\/.nvm<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now run the <a href=\"https:\/\/nodered.org\/docs\/getting-started\/raspberrypi\">node-red setup\/update script<\/a> again and after that services will work again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>On some Raspberry Pi&#8217;s of mine I had problems running node-js as a service as described here. The only hint of a problem I got was a cryptic &#8220;run nvm use latest\/*&#8221; in the setup. I also remembered a post saying that node-red does not like nvm. So how to get rid of nvm you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[80],"tags":[],"class_list":["post-4068","post","type-post","status-publish","format-standard","hentry","category-node-js"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4raCZ-13C","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4068"}],"version-history":[{"count":1,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4068\/revisions"}],"predecessor-version":[{"id":4069,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4068\/revisions\/4069"}],"wp:attachment":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}