<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: K.M WONG</title>
    <description>The latest articles on DEV Community by K.M WONG (@kam89).</description>
    <link>https://dev.to/kam89</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F248840%2Fbd2dbabc-4e4a-4c89-b6e1-8ee7a9694941.png</url>
      <title>DEV Community: K.M WONG</title>
      <link>https://dev.to/kam89</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kam89"/>
    <language>en</language>
    <item>
      <title>Setup React Native CLI in Linux or macOS</title>
      <dc:creator>K.M WONG</dc:creator>
      <pubDate>Tue, 01 Nov 2022 17:45:38 +0000</pubDate>
      <link>https://dev.to/kam89/setup-react-native-cli-in-linux-or-macos-3ga</link>
      <guid>https://dev.to/kam89/setup-react-native-cli-in-linux-or-macos-3ga</guid>
      <description>&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;br&gt;
Hi all 🙂, this post is for those who need help in setting up &lt;strong&gt;React Native CLI&lt;/strong&gt; in &lt;strong&gt;Linux&lt;/strong&gt; or &lt;strong&gt;macOS&lt;/strong&gt;. Basically just to ensure you are following the steps in Setting up the development environment but do take &lt;em&gt;EXTRA NOTE&lt;/em&gt; ⚠️ on the 👉 Important 👈 mentioned below.&lt;/p&gt;

&lt;p&gt;Sorry for those who using &lt;strong&gt;Windows&lt;/strong&gt; 🙇, you may still need refer to the Setting up the development environment and let the &lt;strong&gt;Chocolatey&lt;/strong&gt; to settle for you. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I use &lt;strong&gt;Windows&lt;/strong&gt; entertainment purpose only.&lt;/em&gt; 🎉&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;
  
  
  Side Note:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Linux&lt;/strong&gt; or &lt;strong&gt;Windows&lt;/strong&gt; only support &lt;strong&gt;Android&lt;/strong&gt; since you can only install &lt;strong&gt;Android Studio&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you want to experience the &lt;u&gt;cross-platform&lt;/u&gt; nature provided by &lt;strong&gt;react-native&lt;/strong&gt;, please get a &lt;strong&gt;macOS&lt;/strong&gt; since you can install both &lt;strong&gt;Android Studio&lt;/strong&gt; and &lt;strong&gt;Xcode&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;u&gt;Important&lt;/u&gt;&lt;a&gt;&lt;/a&gt;: ⁉️
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;For &lt;strong&gt;node&lt;/strong&gt;, I recommend to use &lt;strong&gt;nvm&lt;/strong&gt; to install instead of using &lt;strong&gt;Homebrew&lt;/strong&gt; for &lt;strong&gt;macOS&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Same for &lt;strong&gt;ruby&lt;/strong&gt;, you may use &lt;strong&gt;rbenv&lt;/strong&gt; to install.&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;Cocoapods&lt;/strong&gt;, if you are using &lt;strong&gt;Mac M1&lt;/strong&gt;, you might need to use
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arch -x86_64 pod install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;But I recommend to use &lt;strong&gt;brew&lt;/strong&gt; to install &lt;strong&gt;Cocoapods&lt;/strong&gt;, because now you can use &lt;code&gt;pod install&lt;/code&gt; as per mentioned in Stack Overflow.&lt;/li&gt;
&lt;li&gt;Do take note that you need to reinstall &lt;strong&gt;yarn&lt;/strong&gt; if you &lt;em&gt;CHANGE&lt;/em&gt; the &lt;strong&gt;node&lt;/strong&gt; version via &lt;strong&gt;nvm&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Go back to top ☝️&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;u&gt;Dependencies&lt;/u&gt;:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://nodejs.org/en/"&gt;node&lt;/a&gt; - recommend to install via nvm 👇&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/nvm-sh/nvm#installing-and-updating"&gt;nvm&lt;/a&gt; ☝️☝️
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.npmjs.com/"&gt;npm&lt;/a&gt; - packages manager&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://yarnpkg.com/"&gt;yarn&lt;/a&gt; - packages manager (optional)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://brew.sh/"&gt;Homebrew&lt;/a&gt; (for macOS only)&lt;/li&gt;
&lt;li&gt;ruby (for macOS only) - recommend to install via rbenv 👇&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/rbenv/rbenv#installation"&gt;rbenv&lt;/a&gt; (for macOS only) ☝️☝️
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  &lt;u&gt;IDE&lt;/u&gt;:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://code.visualstudio.com/"&gt;Visual Studio Code&lt;/a&gt; (because it is free)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.android.com/studio"&gt;Android Studio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.apple.com/xcode/"&gt;Xcode&lt;/a&gt; (for macOS only)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.jetbrains.com/webstorm/"&gt;WebStorm by JetBrains&lt;/a&gt; (Optional)&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  &lt;u&gt;Steps&lt;/u&gt;:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;strong&gt;node&lt;/strong&gt; via nvm.&lt;/li&gt;
&lt;li&gt;Refer the steps in &lt;a href="https://reactnative.dev/docs/environment-setup"&gt;Setting up the development environment&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;watchman&lt;/strong&gt; via brew. (macOS only)&lt;/li&gt;
&lt;/ol&gt;

&lt;h5&gt;
  
  
  &lt;u&gt;Android&lt;/u&gt;:
&lt;/h5&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;strong&gt;JDK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;Android Studio&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;Android SDK&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h5&gt;
  
  
  &lt;u&gt;iOS&lt;/u&gt;:
&lt;/h5&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;strong&gt;ruby&lt;/strong&gt; via rbenv. (optional because macOS should have ruby installed.)&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;Cocoapods&lt;/strong&gt; via brew.&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;Xcode&lt;/strong&gt; &amp;amp; &lt;strong&gt;Xcode Command Line Tool&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  &lt;u&gt;References:&lt;/u&gt; &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://reactnative.dev/docs/environment-setup#development-os"&gt;Setting up the development environment&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://reactnative.dev/docs/environment-setup#cocoapods"&gt;Cocoapods&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/64901180/how-to-run-cocoapods-on-apple-silicon-m1"&gt;Stack Overflow: How to run CocoaPods on Apple Silicon (M1)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;This is just my experience on settings up React Native CLI, and I am welcome and open to any feedback. Thank you. 🙇&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Good luck and Happy coding! 🎉🎊🎇&lt;/p&gt;

&lt;p&gt;Go back to top ☝️&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
