{"id":185,"date":"2024-02-16T16:49:20","date_gmt":"2024-02-16T16:49:20","guid":{"rendered":"https:\/\/theroyalscode.com\/ehs\/?p=185"},"modified":"2024-04-29T18:57:17","modified_gmt":"2024-04-29T18:57:17","slug":"things-work-better-when-they-are-up-to-date","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/ehs\/2024\/02\/16\/things-work-better-when-they-are-up-to-date\/","title":{"rendered":"Things work better when they are up to date"},"content":{"rendered":"\n<p>I wanted to start learning React so we could explore web development as a class, but I ran into a wall.<\/p>\n\n\n\n<p>First I tried running <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#Do not Run this. It is the problem!\nnpx create-react-app<\/code><\/pre>\n\n\n\n<p>But I got all kinds of error messages warning that packages installed were dangerous. So I saw that you should use something like this instead.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npx create-next-app@latest<\/code><\/pre>\n\n\n\n<p>Worked great on my laptop at home, as expected, it didn&#8217;t work on the school computer. npx runs executables and they don&#8217;t let us do that. It is a problem I have seen before, and I knew a workaround. Move to the virtual machine! Over on the virtual machine, I tried the command again, but I got some errors. I searched through blogs and nothing was working. Just the same errors again and again.<\/p>\n\n\n\n<p>I was about to give up when I saw something stating I need version 18 or higher and I was only on version 12.<\/p>\n\n\n\n<p>I ran a couple updates<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt upgrade<\/code><\/pre>\n\n\n\n<p>Then I followed the directions from pheonixnap.com and we were in business!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.7\/install.sh | bash<\/code><\/pre>\n\n\n\n<p>Close then open the terminal, then update node. You can see the current version <a href=\"https:\/\/nodejs.org\/en\">here<\/a>. At the time I write this, I used 20.11.1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nvm ls-remote\nnvm install &#91;version.number]\nnvm use &#91;version number]<\/code><\/pre>\n\n\n\n<p>Now go ahead and <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npx create-next-app@latest<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"344\" height=\"82\" src=\"https:\/\/theroyalscode.com\/ehs\/wp-content\/uploads\/2024\/02\/image-5.png\" alt=\"\" class=\"wp-image-186\" srcset=\"https:\/\/theroyalscode.com\/ehs\/wp-content\/uploads\/2024\/02\/image-5.png 344w, https:\/\/theroyalscode.com\/ehs\/wp-content\/uploads\/2024\/02\/image-5-300x72.png 300w\" sizes=\"auto, (max-width: 344px) 100vw, 344px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to start learning React so we could explore web development as a class, but I ran into a wall. First I tried running But I got all kinds of error messages warning that packages installed were dangerous. So I saw that you should use something like this instead. Worked great on my laptop [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":186,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[6,7],"tags":[],"class_list":["post-185","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-instructional","category-programming-languages"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/posts\/185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/comments?post=185"}],"version-history":[{"count":3,"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/posts\/185\/revisions"}],"predecessor-version":[{"id":197,"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/posts\/185\/revisions\/197"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/media\/186"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/media?parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/categories?post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/ehs\/wp-json\/wp\/v2\/tags?post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}