<?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: Orunto Eniola</title>
    <description>The latest articles on DEV Community by Orunto Eniola (@orunto).</description>
    <link>https://dev.to/orunto</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%2F1184923%2F35c4e05d-0dc3-4fd1-94a4-175d4d7abc41.png</url>
      <title>DEV Community: Orunto Eniola</title>
      <link>https://dev.to/orunto</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/orunto"/>
    <language>en</language>
    <item>
      <title>Troubleshooting with PipeOps: Error 502 with React apps</title>
      <dc:creator>Orunto Eniola</dc:creator>
      <pubDate>Sat, 15 Jun 2024 17:50:14 +0000</pubDate>
      <link>https://dev.to/orunto/troubleshooting-with-pipeops-error-502-with-react-apps-cb</link>
      <guid>https://dev.to/orunto/troubleshooting-with-pipeops-error-502-with-react-apps-cb</guid>
      <description>&lt;p&gt;Day 3 of [&lt;strong&gt;HackOps 1.0&lt;/strong&gt;] and my quest to compile as many fixes for the errors participants face during the duration of the hackathon continues. Today it's the &lt;code&gt;502: Bad gateway&lt;/code&gt; error some React Devs encountered&lt;/p&gt;

&lt;h4&gt;
  
  
  Mild Disclaimer
&lt;/h4&gt;

&lt;p&gt;I'm making sure to state that these errors and fixes are framework specific so as not to mislead other users that have similar problems in different environments. You are welcome to try it out, but please do let me know whether or not they work for your circumstance so I can update the guide. Thank you 😊&lt;/p&gt;

&lt;h2&gt;
  
  
  Build Settings
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Set your project's &lt;em&gt;framework&lt;/em&gt; to ReactJs and &lt;em&gt;build method&lt;/em&gt; is set to Node (Static Frontend)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl7lyquh9yz1a7pjhba90.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl7lyquh9yz1a7pjhba90.png" alt="Project's framework to ReactJs build method is set to Node (Static Frontend)" width="510" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set &lt;em&gt;build rules&lt;/em&gt; to the node version you used in building your react app and the &lt;em&gt;build path&lt;/em&gt; to the appropriate folder be it &lt;code&gt;dist&lt;/code&gt; or &lt;code&gt;build&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd3k8ewfd6h5m93c7lwex.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd3k8ewfd6h5m93c7lwex.png" alt="Build rules and build path settings" width="516" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That should handle the error. If you have any issues please let me know in the comments.&lt;/p&gt;

&lt;p&gt;Thank you for reading! And to my fellow hackathon competitors, See you at the finals! 🫵&lt;/p&gt;

</description>
      <category>pipeops</category>
      <category>hackathon</category>
      <category>react</category>
      <category>troubleshooting</category>
    </item>
    <item>
      <title>Deploying NextJS apps with PipeOps</title>
      <dc:creator>Orunto Eniola</dc:creator>
      <pubDate>Fri, 14 Jun 2024 20:14:06 +0000</pubDate>
      <link>https://dev.to/orunto/pipeops-with-nextjs-144l</link>
      <guid>https://dev.to/orunto/pipeops-with-nextjs-144l</guid>
      <description>&lt;p&gt;It's Day 2 of &lt;a href="https://pipeops.io/hackathon" rel="noopener noreferrer"&gt;&lt;strong&gt;Pipeops HackOps 1.0&lt;/strong&gt;&lt;/a&gt; and participants are building at full speed 🚀. Just look at the &lt;a href="https://pipeops.io/hackathon/leaderboard" rel="noopener noreferrer"&gt;&lt;strong&gt;leaderboard&lt;/strong&gt;&lt;/a&gt; 😮‍💨&lt;/p&gt;

&lt;p&gt;However, PipeOps is a new platform and as such the builders are still trying to find their footing with it. In light of that here's a quick guide to deploying Next JS apps on Pipeops&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start a new project and select Web Project as project type
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffia3umh7tjocktzct5oe.png" alt="Create a new project" width="403" height="618"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dzmvd4745w8ymwjqvrk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dzmvd4745w8ymwjqvrk.png" alt="Select Web Project as project type" width="654" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select your preferred git provider, the account/organization your project repo is on and your project repo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwdf993z5ip7lcmj5f8vf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwdf993z5ip7lcmj5f8vf.png" alt="Select your preferred git provider, the account/organization your project repo is on and your project repo" width="703" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hit proceed on project summary&lt;/li&gt;
&lt;li&gt;In project build settings, make sure Framework is set to NextJS build method is set to Nixpack&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frjuffsrcqskjepluph8e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frjuffsrcqskjepluph8e.png" alt="Framework is set to NextJS build method is set to Nixpack" width="530" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hit 'Deploy project' and watch the magic happen&lt;/li&gt;
&lt;li&gt;Your NextJS app is now live!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5w417iifwv60jqlfropg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5w417iifwv60jqlfropg.png" alt="The NextJS project is now live" width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Error 503
&lt;/h3&gt;

&lt;p&gt;One of the more common errors participants have run into when deploying NextJS apps is the &lt;code&gt;503 Error&lt;/code&gt; with their live links. This issue has been addressed by the team but here's a rundown incase you missed it 👇&lt;br&gt;
In your project's build settings, change build method is to Heroku BuildPack and that should settle it.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc2k9bel1gv6dflgtjf1k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc2k9bel1gv6dflgtjf1k.png" alt="Build Settings with build method set to Heroku BuildPack" width="781" height="295"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  pnpm
&lt;/h3&gt;

&lt;p&gt;If you're a space saving weirdo (Like me 🤡) that uses pnpm, you need to make sure the following is in order&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Set Lifecycle command to &lt;code&gt;pnpm run&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6qfk8813gfygxn6p0abj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6qfk8813gfygxn6p0abj.png" alt="Lifecycle command in build settings set to pnpm build" width="710" height="518"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When using Heroku BuildPack, specify your pnpm version by running commands in your local environment and commit the resulting change to your &lt;code&gt;package.json&lt;/code&gt; file before building&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;corepack enable

corepack use pnpm@*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Terminal must be running as administrator &lt;/p&gt;
&lt;h3&gt;
  
  
  Image optimization
&lt;/h3&gt;

&lt;p&gt;If you're having &lt;code&gt;Error 404&lt;/code&gt; or &lt;code&gt;Error 502&lt;/code&gt; when trying to load images, you probably have issues with optimization and that can easily be resolved by installing &lt;em&gt;sharp&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i sharp

pnpm add sharp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks for reading, happy building! &lt;/p&gt;

&lt;p&gt;See you at the finals 🫵&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>pipeops</category>
      <category>hackathon</category>
      <category>pnpm</category>
    </item>
  </channel>
</rss>
